summaryrefslogtreecommitdiffstats
path: root/tools/qml/main.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-18 11:22:31 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-18 11:22:31 (GMT)
commit465f4df8ad4be9485c37ecc379c45e758b2842ad (patch)
tree5067e1a64edb496c76e699d2e2b295a9d7aad784 /tools/qml/main.cpp
parent0cea0e45523283d6c31998672f97b0343c1388f2 (diff)
parente66fcc2b1897883d8ec0780c731c5989cb657cdf (diff)
downloadQt-465f4df8ad4be9485c37ecc379c45e758b2842ad.zip
Qt-465f4df8ad4be9485c37ecc379c45e758b2842ad.tar.gz
Qt-465f4df8ad4be9485c37ecc379c45e758b2842ad.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (29 commits) Recognize identifiers containing unicode escape sequences. Fix README Fix doc: QML_DECLARE_TYPE is no longer necessary Fix doc: remote contents requires qmldir Fixed parsing of inner labelled statements. Doc Remove unsupported plugin version flags in .pro files of declarative examples Documentation typo. More QML doc consistency. Ensure existing image is gone before next photo selection. Don't use zoomfactor. Doc: in QML use "real" and "enumeration", not "qreal" and "enum" Doc: Put "default" property label on same line as property name Wait for debug clients asynchronously instead of blocking creation of Test not reliable ResizeMode support for QGraphicsWidgets created with QDeclarativeView More class documentation fixes for declarative. Simplify QML import plugin deployment lines Add QML imports to s60installs.pro Cleanup photoviewer demo. ...
Diffstat (limited to 'tools/qml/main.cpp')
-rw-r--r--tools/qml/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 341908e..5e829a4 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -88,6 +88,8 @@ void usage()
qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
qWarning(" \"list\" for a list of built-ins");
qWarning(" -resizeview .............................. resize the view, not the skin");
+ qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content");
+ qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view");
qWarning(" -qmlbrowser .............................. use a QML-based file browser");
qWarning(" -recordfile <output> ..................... set video recording file");
qWarning(" - ImageMagick 'convert' for GIF)");
@@ -184,6 +186,7 @@ int main(int argc, char ** argv)
bool stayOnTop = false;
bool maximized = false;
bool useNativeFileBrowser = true;
+ bool sizeToView = true;
#if defined(Q_OS_SYMBIAN)
maximized = true;
@@ -270,6 +273,10 @@ int main(int argc, char ** argv)
if (lastArg) usage();
script = QString(argv[++i]);
runScript = true;
+ } else if (arg == "-sizeviewtorootobject") {
+ sizeToView = false;
+ } else if (arg == "-sizerootobjecttoview") {
+ sizeToView = true;
} else if (arg[0] != '-') {
fileName = arg;
} else if (1 || arg == "-help") {
@@ -339,6 +346,7 @@ int main(int argc, char ** argv)
viewer.setNetworkCacheSize(cache);
viewer.setRecordFile(recordfile);
+ viewer.setSizeToView(sizeToView);
if (resizeview)
viewer.setScaleView();
if (fps>0)
@@ -390,6 +398,5 @@ int main(int argc, char ** argv)
}
viewer.setUseGL(useGL);
viewer.raise();
-
return app.exec();
}