Skip to content

Commit a7ffde6

Browse files
committedNov 23, 2017
[ui][bugfix] lineedit add margin for X icon
Fixes #17262 Needs backporting
1 parent fe933d2 commit a7ffde6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/gui/qgsfilterlineedit.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ QgsFilterLineEdit::QgsFilterLineEdit( QWidget *parent, const QString &nullValue
4242
mSearchIconSize = QSize( iconSize, iconSize );
4343
mSearchIconPixmap = searchIcon.pixmap( mSearchIconSize );
4444

45+
// Make some space for the clear icon
46+
QMargins margins( textMargins( ) );
47+
margins.setRight( iconSize );
48+
setTextMargins( margins );
49+
4550
connect( this, &QLineEdit::textChanged, this,
4651
&QgsFilterLineEdit::onTextChanged );
4752
}

0 commit comments

Comments
 (0)
Please sign in to comment.