Have look at the currentIndexChanged signal.
http://qt-project.org/doc/qt-4.8/qcombobox.html#signals

On 10 October 2014 11:02, likage <[email protected]> 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 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, something similar like using list index [0], [1] etc..
>
> self.methodCombo = QComboBox()
> self.methodCombo.addItem('method01')
> self.methodCombo.addItem('method02')
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/6c1e4e7e-74e4-4976-b7a5-f6cfa252016a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/6c1e4e7e-74e4-4976-b7a5-f6cfa252016a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC1AzRyoV7f-tdpxTG-8K9CcvnBsdKRp6PoWubBNaXf-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to