Check if button is pressed in QDialogButtonBox

Kashif Umer kashif.umer at gmail.com
Mon Sep 14 13:11:00 EDT 2009


Hello,
I am new to Python and I'm working with a UI that has a dialog button box
with 'OK' and 'Cancel' standard buttons. I want to check if the 'OK' button
has been pressed, but I can't use isDown or isChecked for example because it
throws an attribute error:

AttributeError: 'StandardButton' object has no attribute 'isDown'

Is this because the StandardButton type does not inherit from the
QPushButton and QAbstractButton classes? How would I perform the check with
the a StandardButton object?

Thanks,

Kashif Umer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090914/85f51102/attachment.html>


More information about the Python-list mailing list