[Interest] Qt Quick, WindowState and ScreenOrientation

Benjamin TERRIER b.terrier at gmail.com
Tue Feb 14 16:39:13 CET 2017


Hi,

I've got some issue with orientation of full screen windows in Qt Quick.

My environment:
- Windows 10 64 bits
- Qt 5.7 and 5.8
- 2 screens:
  1. 1680x1050 (landscape)
  2. 480x800 (portrait)

What I want to do:
Show a Qt app fullscreen on the screen number 2.

What I did:
Starting with Qt Quick Controls 2 application template from Qt
Creator, I simply added "visibility: ApplicationWindow.FullScreen".
The application is shown full screen on screen 2, but it is in landscape.


I've run some tests:
- Windowed Qt Quick application is correctly displayed (ie portrait).
- Full screen Qt Widgets application are correctly displayed.
- Window.contentOrientation does not seem to have any effect.
- Looked at "Screen.orientation", "Screen.primaryOrientation" and
"Screen.width".
  For windowed Qt Quick app I've got Qt::PortraitOrientation,
Qt::PortraitOrientation and 800.
  However, for fullscreen Qt Quick app I've got
Qt::LandscapeOrientation, Qt::LandscapeOrientation and 1050 (!!! It
looks like the window does not know the current screen).

Does anyone know if this is a known bug or if there is a solution ?

Thanks

Benjamin Terrier



More information about the Interest mailing list