Skip to content

Commit

Permalink
Merge pull request #5707 from elpaso/bugfix-17262-lineedit-x-button
Browse files Browse the repository at this point in the history
[ui][bugfix] lineedit add margin for X icon
  • Loading branch information
elpaso committed Nov 23, 2017
2 parents 5206bf0 + a7ffde6 commit d1cf7e6
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 d1cf7e6

Please sign in to comment.