aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/window/main.cpp')
-rw-r--r--examples/quick/window/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/quick/window/main.cpp b/examples/quick/window/main.cpp
index 7872c7183c..953b87e047 100644
--- a/examples/quick/window/main.cpp
+++ b/examples/quick/window/main.cpp
@@ -39,6 +39,7 @@
****************************************************************************/
#include <QtGui/QGuiApplication>
+#include <QtGui/QScreen>
#include <QtQml/QQmlEngine>
#include <QtQml/QQmlComponent>
#include <QtQuick/QQuickWindow>
@@ -48,6 +49,9 @@
int main(int argc, char* argv[])
{
QGuiApplication app(argc, argv);
+ foreach (QScreen * screen, QGuiApplication::screens())
+ screen->setOrientationUpdateMask(Qt::LandscapeOrientation | Qt::PortraitOrientation |
+ Qt::InvertedLandscapeOrientation | Qt::InvertedPortraitOrientation);
QQmlEngine engine;
QQmlComponent component(&engine);
QQuickWindow::setDefaultAlphaBuffer(true);