Thanks Ed. So Maya's native UI receive signals like PyQt too? Right now I stick a None into the argument list and it works. Really curious tho what I can do with it.
On Sun, Jul 15, 2012 at 11:43 PM, Ed Caspersen <[email protected]>wrote: > I think the button is emitting a clicked() event that has a bool argument > for whether or not it is checked. > > http://doc.trolltech.com/4.7/qabstractbutton.html#clicked > > "Checked" buttons are buttons that stay down after being pressed. Tho I > don't recall Maya supporting check state buttons but I could be a little > dated in my knowledge. > > Example of checked (or toggle) buttons > http://zetcode.com/tutorials/pyqt4/widgets/ > > Ed Caspersen > > > On Sun, Jul 15, 2012 at 9:32 AM, Panupat Chongstitwattana < > [email protected]> wrote: > >> I'm learning how to create python UI. So I made a class with a text field >> and a button. >> >> self.input = cmds.textFieldGrp(label=' label') >> self.submit = cmds.button(label='submit', w=215, command=self.doSomething) >> >> def doSomething(self): >> print "OK" >> >> The button isn't doing anything, but when I clicked it I got this error >> >> TypeError: doSomething() takes exactly 1 argument (2 given) # >> >> Why is the function getting 2 arguments? What is it receiving? >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
