Skip to content
Permalink
Browse files

Merge pull request #5707 from elpaso/bugfix-17262-lineedit-x-button

[ui][bugfix] lineedit add margin for X icon
  • Loading branch information
elpaso committed Nov 23, 2017
2 parents 5206bf0 + a7ffde6 commit d1cf7e614f7c60e8d31c047d4a1012d6c530e4d2
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/qgsfilterlineedit.cpp
@@ -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 );
}

0 comments on commit d1cf7e6

Please sign in to comment.
You can’t perform that action at this time.