Question

Is there any definite guide how to make QWidget app portrait oriented on MeeGo Harmattan device?

I'm currently working on N950 (devel version of N9) and my app is in landscape mode all the time.

App was previously written as QApplication with QMainWindow

Was it helpful?

Solution

According to this Nokia documentation, QWidgets are not supported on Harmattan. I think there is some backward compatibility, but if you keep using QWidget you will not have full integration in the platform. This blog post also provides some guidance on porting a Qt application to Harmattan.

If you convert your application to QML, you will then be able to set the orientation lock:

Page{
    orientationLock: PageOrientation.LockPortrait
    ...

which should set your app in portrait mode.

OTHER TIPS

Ok so there is no way to do it using the api since it supports only QML, but some guy have found the solution here. I think this will solve your problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top