After struggling to get emulator to run in landscape mode, I’m faced with a few problems, the first one is an error given in console(same error twice);
[W] unknown:11 - file:///usr/lib/qt5/qml/Sailfish/Silica/private/CoverWindow.qml:11: ReferenceError:
Config is not defined
[W] unknown:11 - file:///usr/lib/qt5/qml/Sailfish/Silica/private/CoverWindow.qml:11: ReferenceError:
Config is not defined
The general performance in landscape (probably portrait too) is abysmally slow, dropping frames like mad, any animations running are so clunky, it’s basically unusable.
I have some good news for you: I was pretty much able to reproduce this with the 4.4.0.58 emulator. On our current development version, which will become the 4.5.0 emulator, I wasn’t able to reproduce. So to me it seems that whatever was causing the messiness has been fixed.
/usr/lib/qt5/qml/Sailfish/Silica/private/CoverWindow.qml:11: ReferenceError: Config is not defined
/usr/lib/qt5/qml/Sailfish/Silica/private/CoverWindow.qml:10: ReferenceError: Config is not defined
In Qt creator, using tools - sailfishos - emulator mode you can set the orientation to portrait or landscape.
In your app you can use a function that changes the orientation, e.g. SwitchOrientation()
function switchOrientation() { if (orientation === Orientation.Landscape) { allowedOrientations = Orientation.Portrait} else allowedOrientations = Orientation.Landscape }
Thanks I had not found the emulator mode menu so far, it would be nice if the emulator could switch mode without rebooting but I guess that would be pretty complicated to implement.