Re: how to query/test the state of a qt widget?

2007-06-24 Thread raacampbell
> RTFM. The Qt-docs are extensive. And the QRadioButton-docs are pretty > straight forward: > > http://doc.trolltech.com/3.3/qradiobutton.html#checked-prop > > So your code above should be > > if self.polPlotRadioButton.isChecked(): print "blah" Thanks, that does indeed work. Also, sorry, I have

how to query/test the state of a qt widget?

2007-06-23 Thread raacampbell
Hi, I'm writing a simple Python/Qt3 application and I am trying to write some code in which the user presses a button and the program performs action A or B depending upon the state of a pair of radio buttons. I would therefore like Python to read the state of the buttons. I was expecting this to

Re: Stuck with pyqt: can't get/read button IDs from a qbuttongroup

2007-03-18 Thread raacampbell
> which translates to this in the .py: > def getNumber(self,a0): > self.listBox1.insertItem(str(id)) > As is typically the way with these things, I've just solved it. I changed the text in the file generated by pyui. It now reads: def getNumber(self,a0): self.listBox1.ins

Stuck with pyqt: can't get/read button IDs from a qbuttongroup

2007-03-18 Thread raacampbell
Hi, I'm learning Python and QT and have set myself the task of writing a simple calculator applet. I'm using Qt3 and with the designer have made a button group which contains 10 buttons to allow the user to press the digits 0 to 9. The idea is that the button group is associated with a single slo