|
Page 1 of 2 |
|
1
2
|
Next
pyqt + Opening new windows query
Hi everyone, i spent about 5 hours last night trying to open new windows within pyqt.
Managed to get hildon stackables working fine, but my app is qt :D ... so i'm trying to be sensible and not mix and match! :D I've got to the point where the window loads fine..! Yay! - but on exit of that window, the original' window goes into a loop of hang'y'ness.... So in pseudo my aim is Load main window click button open new window <allow things to happen> user clicks exit on that window close sub window return to main window... (Allow user to continue using that window!!!!) Ok... so in code..... My button calls this sub (Note my many attempts to sort out the closing - as the window is full screen at time of pressing exit) Code:
Code:
class HelloWindow(QtGui.QMainWindow):Hope that is enough info :D |
Re: pyqt + Opening new windows query
... but.... where is this other window you're talking about ? In the code above you just make one. Also, I think what you want to do with the clicked signal is:
self.connect(self.exitb, QtCore.SIGNAL('clicked()'), self.close) EDIT: So off the top of my head, do you want something like this ? Code:
|
Re: pyqt + Opening new windows query
Quote:
Quote:
|
Re: pyqt + Opening new windows query
@noobmonkey
maybe you are confusing hildon stackable windows with qt windows. if you parent your second window to your main window then Maemo will convert your second window to a hildon stackable for you, and you dont need to mess with close window events, bringing windows to the top etc. just hit the back button at the top left of second window and it will close and de-stack. as per my code in this thread http://talk.maemo.org/showpost.php?p=577316&postcount=9 As there is no hildon specific code I am assuming come PR1.2 this will continue to work. |
Re: pyqt + Opening new windows query
Quote:
*EDIT* QT4.6 set the folllowing attribute Qt::WA_Maemo5StackedWindow as well on both windows to see that nice back button else you will see a cross :p |
Re: pyqt + Opening new windows query
Quote:
As i'm setting it as full screen (to test dead pixels) there is no back button, but i have a normal movable button the screen that i am using to close it... (That also works fine) - but the program hangs once the window closes :( Tried your code :( - also didn't work :( was telling me that i was passing an invalid variable (My Main window...... ) :( :( (Argument 1 has unexpected type) |
Re: pyqt + Opening new windows query
Quote:
but still, dont want the back button as i have it full screen :D |
Re: pyqt + Opening new windows query
3 Attachment(s)
screenshot.....
when i close it falls back to app list screen. healthcheck still running. but hanging......... |
Re: pyqt + Opening new windows query
ok sorted it i think.......... fresh mind and all :D
Well, i was calling it all from the def function. Moved the window setup etc down to main initialisation (Where my other window is called....... Made more sense) - and then just ran window.show..... Doesnt hang, no cpu spikes and all back to normal :D |
Re: pyqt + Opening new windows query
Quote:
|
| All times are GMT. The time now is 19:32. |
Page 1 of 2 |
|
1
2
|
Next
vBulletin® Version 3.8.8