summaryrefslogtreecommitdiffstats
path: root/tools/qml/qmlruntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qml/qmlruntime.cpp')
-rw-r--r--tools/qml/qmlruntime.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index e0482cf..2cca262 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -534,17 +534,6 @@ QString QDeclarativeViewer::getVideoFileName()
return QFileDialog::getSaveFileName(this, title, "", types.join(";; "));
}
-QDeclarativeViewer *QDeclarativeViewer::inst = 0;
-
-QDeclarativeViewer *QDeclarativeViewer::instance(QWidget *parent, Qt::WindowFlags flags)
-{
- if (!inst) {
- inst = new QDeclarativeViewer(parent, flags);
- inst->setAttribute(Qt::WA_DeleteOnClose);
- }
- return inst;
-}
-
QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
, loggerWindow(new LoggerWidget(this))
@@ -1400,6 +1389,7 @@ void QDeclarativeViewer::updateSizeHints()
canvas->setMinimumSize(newWindowSize);
canvas->resize(newWindowSize);
resize(1, 1); // workaround for QMainWindowLayout NOT shrinking the window if the centralWidget() shrinks
+ canvas->setMinimumSize(QSize(0, 0));
}
} else { // QDeclarativeView::SizeRootObjectToView
canvas->setMinimumSize(QSize(0,0));