Is there a simple way to disable screen rotation in Qt for whole app? I just don't want to worry about that and simply disable it.
I am using Qt 5.8 and targeting Windows.
Is there a simple way to disable screen rotation in Qt for whole app? I just don't want to worry about that and simply disable it.
I am using Qt 5.8 and targeting Windows.
It's pointless, because screen rotation from your perspective is the same as a screen resolution change, and if you turn that off, your users will be rightly hating you.
If you wish to test your code for compatibility with screen rotation, emulate it by changing screen resolution.
The best way would be to disable rotation in Windows. The only other way I see is to display your widgets/qml rotated according to the current device orientation. Here is a code for obtaining current orientation under Windows (tested on Windows 8.1 tablet):