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
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
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
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
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