summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qinputdialog.cpp
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-12-09 12:25:16 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-12-09 12:25:16 (GMT)
commitad68c845e3e368dc4235e64b54e15a9ee886b078 (patch)
tree0910ec90106c64da32246d997c0d2fa9ebc61a0d /src/gui/dialogs/qinputdialog.cpp
parent6b9cef34c48759e44eceb4c5ace7da164f4134ae (diff)
downloadQt-ad68c845e3e368dc4235e64b54e15a9ee886b078.zip
Qt-ad68c845e3e368dc4235e64b54e15a9ee886b078.tar.gz
Qt-ad68c845e3e368dc4235e64b54e15a9ee886b078.tar.bz2
QLabel wraps text at fixed lengths
There are multiple problems with text wrapping and dialogs. First, teh CBA height was assumed to be zero, or fetch from previous layout, which caused the dialog to be half under the CBA. Now, CBA height is always asked from AVKON metrics, since asking it from actual component might fail (or produce incorrect results) due to that the component is not created yet (or might still have previous layout active). Additionally, qinputDialog label is now having a size policy to restrict its growing out of dialog borders. Task-number: QT-4354 Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui/dialogs/qinputdialog.cpp')
-rw-r--r--src/gui/dialogs/qinputdialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index ce27bd3..a29376a 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -234,6 +234,8 @@ void QInputDialogPrivate::ensureLayout()
//we want to let the input dialog grow to available size on Symbian.
#ifndef Q_OS_SYMBIAN
mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
+#else
+ label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
#endif
mainLayout->addWidget(label);
mainLayout->addWidget(inputWidget);