[PyKDE] QWidgetFactory problems
Eli Yukelzon
reflog at gmail.com
Sun Feb 6 08:45:03 GMT 2005
Hi there.
I've picked up a very nice WidgetFactory wrapper from PyQT wiki, and
been a very happy user so far. But today I've came across a very
serious (for me) problem with it, and was hoping that someone can shed
some light over this. Here's the situation:
I have QMainWindow and I want to catch it's closeEvent (to ask for
user interaction). When I use pyuic to generate the class, and then
capture the event - all works just great.
When I use WidgetFactory to create the window, the event is fired only
when the signal is emited (i,e when i connect some button to close()
slot), but not when the event is 'spontanious', i.e. when the 'x'
button is pressed in window's titlebar.
I've attached an example of the problem. the ui file, the qt_loader
which is the WidgetFactory wrapper, and .py file which has both
versions of code, with, and without WidgetFactory.
Thanks in advance,
Eli Yukelzon
--
2B OR NOT 2B = FF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testform.py
Type: application/octet-stream
Size: 1719 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050206/7f5a5e44/testform.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testform.ui
Type: application/octet-stream
Size: 1208 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050206/7f5a5e44/testform-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_ui_loader.py
Type: application/octet-stream
Size: 5425 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050206/7f5a5e44/qt_ui_loader.obj
More information about the PyQt
mailing list