Overloaded pyside signals (QComboBox)

Viewed 4124

Using a QComboBox with pyside, I know how to connect the signal and use the index that it sends. But what about the unicode argument? If I'd prefer to connect to something that wants the string from the combobox, is that possible?

From: http://www.pyside.org/docs/pyside/PySide/QtGui/QComboBox.html#PySide.QtGui.QComboBox

All three signals exist in two versions, one with a PySide.QtCore.QString argument and one with an int argument.

Signals

def activated (arg__1)
def activated (index)

PySide.QtGui.QComboBox.activated(index) Parameters: index – PySide.QtCore.int

PySide.QtGui.QComboBox.activated(arg_1) Parameters: arg_1 – unicode

Edit: some code.

le = ComboBoxIpPrefix()
le.currentIndexChanged.connect(lambda x....)

This code gives me the index. The question was how to get the unicode string mentioned in the docs.

2 Answers
Related