强制QListWidget信号在pyside中发出

时间:2015-11-30 21:10:39

标签: python pyside

如何强制从按钮按下的功能中发出以下任何信号?

def currentItemChanged (current, previous)
def currentRowChanged (currentRow)
def currentTextChanged (currentText)
def itemActivated (item)
def itemChanged (item)
def itemClicked (item)
def itemDoubleClicked (item)
def itemEntered (item)
def itemPressed (item)
def itemSelectionChanged ()

1 个答案:

答案 0 :(得分:1)

您可以自己发出信号。假设selfQListWidget的实例:

self.itemActivated.emit(myItem)
self.currentTextChanged.emit("some new text")
...