diff options
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 190ff8d2c5..242a4405ca 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -437,8 +437,6 @@ bool QLineEdit::hasFrame() const #if QT_CONFIG(action) /*! - \overload - Adds the \a action to the list of actions at the \a position. \since 5.2 @@ -682,7 +680,8 @@ QSize QLineEdit::sizeHint() const Q_D(const QLineEdit); ensurePolished(); QFontMetrics fm(font()); - int h = qMax(fm.height(), 14) + 2*d->verticalMargin + const int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this); + int h = qMax(fm.height(), iconSize - 2) + 2*d->verticalMargin + d->topTextMargin + d->bottomTextMargin + d->topmargin + d->bottommargin; int w = fm.horizontalAdvance(QLatin1Char('x')) * 17 + 2*d->horizontalMargin |