If it has no parent, you can just set the orientation attribute: Code: self.setAttribute(Qt.WA_Maemo5PortraitOrientation) If it belongs to another widget (has a parent), you will set this attribute on its parent. For more examples of orientation, how to use forms created with Qt Designer, or anything else, check out the source of maegym Code is fairly clean, though I plan to refactor a few things.
self.setAttribute(Qt.WA_Maemo5PortraitOrientation)