![]() |
How to set a Qt form to portrait orientation in PyQt?
Im trying to set the orientation of a simple test Gui to portrait and I thought by adding
self.ui.setAttribute(Qt.WA_Maemo5PortraitOrientati on, True) to the main.py file that would do it. Unfortunately it doesn't seem to be that simple. Once things go past being dead simple then Im in trouble, could someone more familiar point me to the problem and how I can correct it? Many thanks :) Code:
#!/usr/bin/python2.5 |
Re: How to set a Qt form to portrait orientation in PyQt?
Quote:
hmm.. I import differently, because I don't feel like typing QtGui and such everywhere. This seems to work: Code:
#!/usr/bin/python2.5 |
Re: How to set a Qt form to portrait orientation in PyQt?
Thank you for your help Mece :)
I finally got it working by removing the "ui" from self.ui.setAttribute(Qt.WA_Maemo5PortraitOrientati on, True), so it now reads self.setAttribute....... One thing that kinda irritates me is that when I minimize the application window, to see the multitasking view, it goes back into trying to display the form in landscape view so it looks wrong in the small preview pane. Once I click on it again, it expands and goes back into portrait. Is this normal behaviour? |
Re: How to set a Qt form to portrait orientation in PyQt?
Quote:
|
All times are GMT. The time now is 03:22. |
vBulletin® Version 3.8.8