Skip to content

Commit

Permalink
[ui][bugfix] lineedit add margin for X icon
Browse files Browse the repository at this point in the history
Fixes #17262

Needs backporting
  • Loading branch information
elpaso committed Nov 23, 2017
1 parent fe933d2 commit a7ffde6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsfilterlineedit.cpp
Expand Up @@ -42,6 +42,11 @@ QgsFilterLineEdit::QgsFilterLineEdit( QWidget *parent, const QString &nullValue
mSearchIconSize = QSize( iconSize, iconSize );
mSearchIconPixmap = searchIcon.pixmap( mSearchIconSize );

// Make some space for the clear icon
QMargins margins( textMargins( ) );
margins.setRight( iconSize );
setTextMargins( margins );

connect( this, &QLineEdit::textChanged, this,
&QgsFilterLineEdit::onTextChanged );
}
Expand Down

0 comments on commit a7ffde6

Please sign in to comment.