Re: [Maya-Python] Grab qcomboxbox index

2014-10-20 Thread Justin Israel
On 20/10/2014 7:56 PM, "Fredrik Averpil" wrote: > > That's pretty neat. I would have used a whole lot more code. Thanks for the tip, Justin. > No problem! > On Fri, Oct 10, 2014 at 12:22 PM, Justin Israel wrote: >> >> There are a couple ways to do this. One is to store your callbacks as the dat

Re: [Maya-Python] Grab qcomboxbox index

2014-10-19 Thread Fredrik Averpil
That's pretty neat. I would have used a whole lot more code. Thanks for the tip, Justin. On Fri, Oct 10, 2014 at 12:22 PM, Justin Israel wrote: > There are a couple ways to do this. One is to store your callbacks as the > data for each item: > > class Test(QtGui.QDialog): > > def __init__(se

Re: [Maya-Python] Grab qcomboxbox index

2014-10-10 Thread Justin Israel
There are a couple ways to do this. One is to store your callbacks as the data for each item: class Test(QtGui.QDialog): def __init__(self): super(Test, self).__init__() self.combo = QtGui.QComboBox() self.combo.addItem("First Callback", self.callback1) self.c

Re: [Maya-Python] Grab qcomboxbox index

2014-10-10 Thread Marcus Ottosson
Have look at the currentIndexChanged signal. http://qt-project.org/doc/qt-4.8/qcombobox.html#signals On 10 October 2014 11:02, likage wrote: > I have a QComboBox in which it contains 2 items. > > How can I code it in such a way that when the first item in the combobox > is selected, it will call

[Maya-Python] Grab qcomboxbox index

2014-10-10 Thread likage
I have a QComboBox in which it contains 2 items. How can I code it in such a way that when the first item in the combobox is selected, it will call out the function that is for the first item. Likewise, if the second item is selected, it will call out the function for the second item, somethin