diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-10-26 05:41:51 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-10-26 05:41:51 (GMT) |
commit | 91be655a7e893d34fdbdb71aa5a329b641c80992 (patch) | |
tree | 44fb2b8bb3040d709b85e366f7660f532caabd98 /tools/qmlviewer/qmlviewer.cpp | |
parent | de3b541e40d9fdb01bc46f472c6032e2a9f45c95 (diff) | |
download | Qt-91be655a7e893d34fdbdb71aa5a329b641c80992.zip Qt-91be655a7e893d34fdbdb71aa5a329b641c80992.tar.gz Qt-91be655a7e893d34fdbdb71aa5a329b641c80992.tar.bz2 |
Fix "initial" size for remote content.
Diffstat (limited to 'tools/qmlviewer/qmlviewer.cpp')
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 73aae44..b115abb 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -310,6 +310,7 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags) canvas->setFocus(); QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize))); + QObject::connect(canvas, SIGNAL(initialSize(QSize)), this, SLOT(adjustSizeSlot())); QObject::connect(canvas, SIGNAL(errors(QList<QmlError>)), this, SLOT(executeErrors())); if (!(flags & Qt::FramelessWindowHint)) @@ -335,6 +336,11 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags) recordTimer.setRepeating(true); } +void QmlViewer::adjustSizeSlot() +{ + adjustSize(); +} + QMenuBar *QmlViewer::menuBar() const { if (!mb) @@ -680,7 +686,7 @@ void QmlViewer::openQml(const QUrl& url) canvas->updateGeometry(); if (mb) mb->updateGeometry(); - resize(sizeHint()); + adjustSize(); } else { if (scaleSkin) canvas->resize(canvas->sizeHint()); |