[Panel-devel] PyQt - Check boxes - Qt Designer

Matt matt-lists at comnet.net.nz
Mon Jul 25 03:57:06 CEST 2005


Hello,

I know this is probably off-topic, but this seemed like a good place to
ask - knowledgeable qt people.  I'm trying to impliment a PyQt based
configuration gui for liquid weather ++, and I've got some of (at least
what seem to me) the more complex stuff done - like searching and
displaying location codes from within the gui, but I'm stuck on a very
basic point.

How can I dynamically specify whether a checkbox is on or off when the
configuration dialog is first called.  Obviously I want the status of
checkboxes and radiobuttons to reflect the current configuration state.

I can see that this would be done by passing arguments to the dialog
when it's called, and I can see that you would use the setChecked()
method to set it.  However, the problem is how to specify what goes in
the () bit in Qt Designer.  All I can see in the "Properties" area in Qt
Designer for specifying whether a checkbox is checked, is a true/false
option.  Is there any way to specify something else from with Qt
Designer?  I could hand code it in once I've compiled the .py file from
the .ui file, but this will get clobbered every time I want to change
the .ui file.  I'd rather avoid that.

Anyone able to help?

Matt



More information about the Panel-devel mailing list