Skip to content
Permalink
Browse files

[ui][bugfix] lineedit add margin for X icon

Fixes #17262

Needs backporting
  • Loading branch information
elpaso committed Nov 23, 2017
1 parent fe933d2 commit a7ffde6c95207f52f8fed94e0c356bfda862491d
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 a7ffde6

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