On Mon, 14 Nov 2011 18:20:31 -0500
Brian Theado <[email protected]> wrote:
> from PyQt4 import QtGui
> w = QtGui.QWidget()
> w.resize(250, 150)
> w.move(300, 300)
> w.setWindowTitle('Simple test')
> w.show()
>
> When I try the above, I see a window appear and then immediately
> disappear. Is there something else I need to do in order to keep the
> window around?
When the script exits the sole reference to the window, w, ceases to
exist, so the window is destroyed (garbage collected).
You could do
c.brian_test_w = w
as the last line to keep a reference alive.
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.