Definite guide to make QWidget app Portrait oriented on Harmattan

465 views Asked by At

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

2

There are 2 answers

3
Luc Touraille On BEST ANSWER

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.

4
v01d On

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.