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:
scorpio810
2015-07-20 19:16:12 +00:00
parent c885ce3d7a
commit 50d98b2167
2 changed files with 3 additions and 9 deletions

View File

@@ -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));
}