点击运行就会执行按钮的事件(打印111),界面打开以后,点击按钮,就不触发事件了(就不会打印信息了),各位帮忙看下哪的问题?多多指教。
import sys
sys.path.append('D:\Lib\site-packages')
from PySide2.QtWidgets import QApplication, QMainWindow, QPushButton, QPlainTextEdit, QLineEdit, QTableWidget
app = QApplication([])
window = QMainWindow()
window.resize(520, 250)
window.move(300, 310)
button = QPushButton('统计', window)
button.move(410,5)
button.clicked.connect(print("111"))
window.show()
app.exec_()