diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-12-03 05:15:51 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-12-03 05:15:51 (GMT) |
commit | 2a67cbb031608e73b0e02a12ea26de6d43c9250d (patch) | |
tree | 535452ad1360f132697410d489495861222b653d | |
parent | fe63d0ee5671ec4f0a1926ad8875b9f11789b105 (diff) | |
download | Qt-2a67cbb031608e73b0e02a12ea26de6d43c9250d.zip Qt-2a67cbb031608e73b0e02a12ea26de6d43c9250d.tar.gz Qt-2a67cbb031608e73b0e02a12ea26de6d43c9250d.tar.bz2 |
Give qmlviewer a minimum size if root object has no size.
de8c9d69fa7c7cc50e9a238e58f6e9370f158fc4 ensured the window was at
least partly visible on Windows and Linux but it did not work on Mac.
Task-number: QTBUG-15783
Reviewed-by: Alan Alpert
-rw-r--r-- | tools/qml/qmlruntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 7ea77d1..a368bc1 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1520,7 +1520,7 @@ void QDeclarativeViewer::updateSizeHints(bool initial) //qWarning() << "USH: R2V: setting free size "; layout()->setSizeConstraint(QLayout::SetNoConstraint); layout()->activate(); - setMinimumSize(QSize(1,1)); + setMinimumSize(minimumSizeHint()); setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); canvas->setMinimumSize(QSize(0,0)); canvas->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); |