如何强制从按钮按下的功能中发出以下任何信号?
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 ()
答案 0 :(得分:1)
您可以自己发出信号。假设self
是QListWidget
的实例:
self.itemActivated.emit(myItem)
self.currentTextChanged.emit("some new text")
...