mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
ConductorPropertiesWidget: improve set focus to QLineEdit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4059 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -28,8 +28,7 @@
|
||||
*/
|
||||
ConductorPropertiesWidget::ConductorPropertiesWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ConductorPropertiesWidget),
|
||||
m_activation (true)
|
||||
ui(new Ui::ConductorPropertiesWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
initWidget();
|
||||
@@ -125,12 +124,8 @@ ConductorProperties ConductorPropertiesWidget::properties() const {
|
||||
*/
|
||||
bool ConductorPropertiesWidget::event(QEvent *event)
|
||||
{
|
||||
if (m_activation)
|
||||
{
|
||||
if (event -> type() == QEvent::WindowActivate || event -> type() == QEvent::Show)
|
||||
{
|
||||
ui -> m_text_le -> setFocus();
|
||||
}
|
||||
if (event->type() == QEvent::WindowActivate) {
|
||||
ui -> m_text_le -> setFocus();
|
||||
}
|
||||
return(QWidget::event(event));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user