forked from qt-creator/qt-creator
Let Qml scene define the window size on Desktop
And also prevent a 0-size if the Qml document does not specify width/height.
This commit is contained in:
@@ -16,7 +16,6 @@ int main(int argc, char *argv[])
|
||||
#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
|
||||
qmlApp.showMaximized();
|
||||
#else
|
||||
qmlApp.setGeometry(QRect(100, 100, 360, 640));
|
||||
qmlApp.show();
|
||||
#endif
|
||||
return app.exec();
|
||||
|
||||
@@ -33,6 +33,7 @@ QmlApplicationView::QmlApplicationView(const QString &mainQmlFile, QWidget *pare
|
||||
setSource(QUrl(m_d->mainQmlFile));
|
||||
connect(engine(), SIGNAL(quit()), SLOT(close()));
|
||||
setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
||||
setMinimumSize(10, 10); // Prevent size of 0 if Qml document does not specify width/height
|
||||
}
|
||||
|
||||
QmlApplicationView::~QmlApplicationView()
|
||||
|
||||
Reference in New Issue
Block a user