diff options
| author | J-P Nurmi <jpnurmi@digia.com> | 2013-11-27 17:38:12 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-28 16:14:43 +0100 |
| commit | 1070aeb5521a95039cad3f4536e85e99526a4900 (patch) | |
| tree | 2b31244780d129053fd30274bc3662be34f45eb4 /examples/quick/controls/splitview | |
| parent | 605f63a1880400a5b540bab60ad68d3612bd71c1 (diff) | |
Revise main() in examples
Replace the inconvenient QT_QUICK_CONTROLS_EXAMPLE_MAIN macro with a
simpler macro that merely defines the actual application type. This way
it's easier to do tweaks to main() when for example testing a different
application font size. Moreover, browsing the example code becomes more
convenient (especially online).
Task-number: QTBUG-35083
Change-Id: I8203816a9112bf29b4661baa86bf4a196554db05
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'examples/quick/controls/splitview')
| -rw-r--r-- | examples/quick/controls/splitview/main.qml | 1 | ||||
| -rw-r--r-- | examples/quick/controls/splitview/splitview.pro | 1 | ||||
| -rw-r--r-- | examples/quick/controls/splitview/src/main.cpp | 11 |
3 files changed, 11 insertions, 2 deletions
diff --git a/examples/quick/controls/splitview/main.qml b/examples/quick/controls/splitview/main.qml index 992607d62..395188ce7 100644 --- a/examples/quick/controls/splitview/main.qml +++ b/examples/quick/controls/splitview/main.qml @@ -47,6 +47,7 @@ import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 ApplicationWindow { + visible: true width: 600 height: 400 diff --git a/examples/quick/controls/splitview/splitview.pro b/examples/quick/controls/splitview/splitview.pro index 066e578c3..11c55f745 100644 --- a/examples/quick/controls/splitview/splitview.pro +++ b/examples/quick/controls/splitview/splitview.pro @@ -3,6 +3,7 @@ TARGET = splitview !android: !ios: !blackberry: qtHaveModule(widgets): QT += widgets include(src/src.pri) +include(../shared/shared.pri) OTHER_FILES += \ main.qml diff --git a/examples/quick/controls/splitview/src/main.cpp b/examples/quick/controls/splitview/src/main.cpp index 57ba57e35..a757f4853 100644 --- a/examples/quick/controls/splitview/src/main.cpp +++ b/examples/quick/controls/splitview/src/main.cpp @@ -38,5 +38,12 @@ ** ****************************************************************************/ -#include "../../shared/qt_quick_controls_examplemain.h" -QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml) +#include "qtquickcontrolsapplication.h" +#include <QtQml/QQmlApplicationEngine> + +int main(int argc, char *argv[]) +{ + QtQuickControlsApplication app(argc, argv); + QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); + return app.exec(); +} |
