[PyQt] QComboBox with history

simone simozack at yahoo.it
Thu Jul 3 17:02:09 BST 2008


Filip Gruszczyński ha scritto:

> Therefore I need to intercept the event when user chooses new option
> in the combo box, add information to the history and then let the rest
> happen (like emitting signals). I can't just intercept a signal,
> because I have no control over order of interception.

Sorry, I don't understand correctly your desire... :)

When the index changed I normally connect the currentIndexChanged to the 
function needed.

Some code:

self.connect(self.ComboBox, SIGNAL("currentIndexChanged(int)"), 

              self.onIndexChanged)

def onIndexChanged(self, index):
     print self.ComboBox.itemData(index).toString()


Normally this works for me... :)

--
Simone
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



More information about the PyQt mailing list