[PyKDE] Hi everyone...
phil at river-bank.demon.co.uk
Sat Feb 10 13:02:13 GMT 2001
Ken Kozman wrote:
> I'm having some weird things occur with PyQt2.2.
> Below is an example .py script for a silly little test application. Under
> Windows however I get really strange behavior whenever I create a sub dialog
> as a result of getting a "pressed( )" signal from a parent dialog. The
> strangeness ranges from the original button "pressed( )" not popping back
> out (which happens with a QMessageBox and also when the user cancels from a
> QFileDialog.getSaveFileName call.) to the parent dialog not responding to
> any user input until it is repainted (which is the case with a home brew
> QFileDialog.) Has anyone else experienced this? I'm sure I am just being
> dumb, but I can not figure out where.
> Any help would be greatly appreciated.
Because you are using the pressed() signal your modal dialogs are being
created while you still have the mouse button pressed. When you release
the mouse button, the event is going to the dialog (and being discarded)
and not the QPushButton. Use the clicked() signal instead.
Your script also triggers and unrelated bug in the SIP library. I'm
about to commit the fix to this to the CVS.
More information about the PyQt