mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
ConductorPropertiesWidget: set focus to the line edit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4053 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,6 +34,31 @@ ConductorPropertiesWidget::ConductorPropertiesWidget(QWidget *parent) :
|
||||
initWidget();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::event
|
||||
* @param event
|
||||
* @return
|
||||
*/
|
||||
bool ConductorPropertiesWidget::event(QEvent *event)
|
||||
{
|
||||
if (m_first_activation)
|
||||
{
|
||||
if (event -> type() == QEvent::WindowActivate || event -> type() == QEvent::Show)
|
||||
{
|
||||
QTimer::singleShot(10, this, SLOT(firstActivated()));
|
||||
m_first_activation = true;
|
||||
}
|
||||
}
|
||||
return(QWidget::event(event));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::firstActivated
|
||||
*/
|
||||
void ConductorPropertiesWidget::firstActivated() {
|
||||
ui -> m_text_le -> setFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::ConductorPropertiesWidget
|
||||
* Constructor with properties
|
||||
|
||||
Reference in New Issue
Block a user