View Single Post
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#27
Originally Posted by konttori View Post
Sure, it's an XAtom, so it's easy to make the call from pyqt to it. Well, from any python app, it should be about the same call.

It's basically to call the counterpart of this:
hildon.hildon_gtk_window_set_portrait_flags(window , flags)

Anyway, the auto rotate is really convenient, because if you set that as the flag, the above line is the only thing you need from all that code from xorbit. Anyway, it's as easy with pyqt, I just don't have a snipplet at hand. Perhaps someone else has.
@Konttori

Just pulled this from the pyside mobile demos, it this what you are refering to:

System.setViewMode(view,System.PortraitMode)
==============================

mainWindow = MainWindow()
scene.addItem(mainWindow)
mainWindow.setGeometry(0, 0, width, height)
System.setViewMode(view, System.PortraitMode)
if USE_MAEMO:
view.showFullScreen()
else:
view.setFixedSize(width, height);
view.show();
return app.exec_()
====================================
__________________
N900_Email_Options Wiki Page