diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/controls/gallery/gallery.pro | 1 | ||||
-rw-r--r-- | examples/quick/controls/gallery/main.qml | 2 | ||||
-rw-r--r-- | examples/quick/controls/gallery/src/main.cpp | 8 | ||||
-rw-r--r-- | examples/quick/dialogs/systemdialogs/main.cpp | 8 |
4 files changed, 17 insertions, 2 deletions
diff --git a/examples/quick/controls/gallery/gallery.pro b/examples/quick/controls/gallery/gallery.pro index d4d5f16e..d7328918 100644 --- a/examples/quick/controls/gallery/gallery.pro +++ b/examples/quick/controls/gallery/gallery.pro @@ -12,7 +12,6 @@ OTHER_FILES += \ content/Controls.qml \ content/ImageViewer.qml \ content/ModelView.qml \ - content/Panel.qml \ content/Styles.qml RESOURCES += \ diff --git a/examples/quick/controls/gallery/main.qml b/examples/quick/controls/gallery/main.qml index 0ca8c7cf..0a385a1b 100644 --- a/examples/quick/controls/gallery/main.qml +++ b/examples/quick/controls/gallery/main.qml @@ -167,7 +167,7 @@ ApplicationWindow { RowLayout { id: toolbarLayout spacing: 0 - width: parent.width + anchors.fill: parent ToolButton { iconSource: "images/window-new.png" onClicked: window1.visible = !window1.visible diff --git a/examples/quick/controls/gallery/src/main.cpp b/examples/quick/controls/gallery/src/main.cpp index a757f485..b0d12b85 100644 --- a/examples/quick/controls/gallery/src/main.cpp +++ b/examples/quick/controls/gallery/src/main.cpp @@ -40,10 +40,18 @@ #include "qtquickcontrolsapplication.h" #include <QtQml/QQmlApplicationEngine> +#include <QtGui/QSurfaceFormat> +#include <QtQuick/QQuickWindow> int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); + if (QCoreApplication::arguments().contains(QLatin1String("--coreprofile"))) { + QSurfaceFormat fmt = QQuickWindow::defaultFormat(); + fmt.setVersion(4, 4); + fmt.setProfile(QSurfaceFormat::CoreProfile); + QQuickWindow::setDefaultFormat(fmt); + } QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); return app.exec(); } diff --git a/examples/quick/dialogs/systemdialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp index fd882200..6d0fef3c 100644 --- a/examples/quick/dialogs/systemdialogs/main.cpp +++ b/examples/quick/dialogs/systemdialogs/main.cpp @@ -40,10 +40,18 @@ #include "qtquickcontrolsapplication.h" #include <QtQml/QQmlApplicationEngine> +#include <QtGui/QSurfaceFormat> +#include <QtQuick/QQuickWindow> int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); + if (QCoreApplication::arguments().contains(QLatin1String("--coreprofile"))) { + QSurfaceFormat fmt = QQuickWindow::defaultFormat(); + fmt.setVersion(4, 4); + fmt.setProfile(QSurfaceFormat::CoreProfile); + QQuickWindow::setDefaultFormat(fmt); + } QQmlApplicationEngine engine(QUrl("qrc:/dialogs/systemdialogs/systemdialogs.qml")); return app.exec(); } |