summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r--src/widgets/widgets/qlineedit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 3db7781acc..5a504a880c 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -712,8 +712,11 @@ QSize QLineEdit::minimumSizeHint() const
ensurePolished();
QFontMetrics fm = fontMetrics();
int h = fm.height() + qMax(2*d->verticalMargin, fm.leading())
+ + d->topTextMargin + d->bottomTextMargin
+ d->topmargin + d->bottommargin;
- int w = fm.maxWidth() + d->leftmargin + d->rightmargin;
+ int w = fm.maxWidth()
+ + d->effectiveLeftTextMargin() + d->effectiveRightTextMargin()
+ + d->leftmargin + d->rightmargin;
QStyleOptionFrame opt;
initStyleOption(&opt);
return (style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(w, h).