我有以下python类:
class Example(QMainWindow):
def onChanged(self, text):
return text
def buttonClicked(self):
print(self.onChanged)
运行脚本时,我得到以下结果:
<bound method Example.onChanged of <__main__.Example object at 0x7fde1cab0550>>
我的问题是如何获取在onChanged
函数中返回的文本内容
多谢各位
Tags:
当您执行
print(self.onChanged)
时,您不需要调用函数,而是应该执行print(self.onChanged())
相关问题 更多 >
编程相关推荐