File tree 3 files changed +14
-0
lines changed
python/gui/auto_generated
3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,8 @@ Will select all text when this widget receives the focus.
268
268
protected:
269
269
virtual void focusInEvent( QFocusEvent *e );
270
270
271
+ virtual void mouseReleaseEvent( QMouseEvent *e );
272
+
271
273
272
274
};
273
275
Original file line number Diff line number Diff line change @@ -90,6 +90,16 @@ void QgsFilterLineEdit::focusInEvent( QFocusEvent *e )
90
90
if ( e->reason () == Qt::MouseFocusReason && ( isNull () || mSelectOnFocus ) )
91
91
{
92
92
mFocusInEvent = true ;
93
+ mWaitingForMouseRelease = true ;
94
+ }
95
+ }
96
+
97
+ void QgsFilterLineEdit::mouseReleaseEvent ( QMouseEvent *e )
98
+ {
99
+ QLineEdit::mouseReleaseEvent ( e );
100
+ if ( mWaitingForMouseRelease )
101
+ {
102
+ mWaitingForMouseRelease = false ;
93
103
selectAll ();
94
104
}
95
105
}
Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
265
265
266
266
protected:
267
267
void focusInEvent ( QFocusEvent *e ) override ;
268
+ void mouseReleaseEvent ( QMouseEvent *e ) override ;
268
269
269
270
private slots:
270
271
void onTextChanged ( const QString &text );
@@ -286,6 +287,7 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
286
287
QString mDefaultValue ;
287
288
QString mStyleSheet ;
288
289
bool mFocusInEvent = false ;
290
+ bool mWaitingForMouseRelease = false ;
289
291
bool mSelectOnFocus = false ;
290
292
291
293
QgsAnimatedIcon *mBusySpinnerAnimatedIcon = nullptr ;
You can’t perform that action at this time.
0 commit comments