문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top