Skip to content

Commit b522991

Browse files
committed
give focus to the combo so QgsFieldExpressionWidget can be used as a delegate (allow pressing expression dialog button)
1 parent 0575c71 commit b522991

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gui/qgsfieldexpressionwidget.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ QgsFieldExpressionWidget::QgsFieldExpressionWidget( QWidget *parent )
4343
layout->addWidget( mCombo );
4444
layout->addWidget( mButton );
4545

46+
// give focus to the combo
47+
// hence if the widget is used as a delegate
48+
// it will allow pressing on the expression dialog button
49+
setFocusProxy( mCombo );
50+
4651
connect( mCombo->lineEdit(), SIGNAL( textEdited( QString ) ), this, SLOT( expressionEdited( QString ) ) );
4752
connect( mCombo->lineEdit(), SIGNAL( editingFinished() ), this, SLOT( expressionEditingFinished() ) );
4853
connect( mCombo, SIGNAL( activated( int ) ), this, SLOT( currentFieldChanged( int ) ) );

0 commit comments

Comments
 (0)