我正在尝试在按下 fieldE 按钮时创建新窗口,但它没有发生。Mapeditor() 类正在工作,所以我认为当我调用 fieldE.clicked.connection 函数时问题是一致的。有小费吗?
def startGpressed(name):
print(name)
def fieldeditorOPEN():
fieldScreen = Mapeditor()
def main():
app = QApplication(sys.argv)
ex = App()
buttons = ex.initUI()
startG = buttons[0]
fieldE = buttons[1]
startG.clicked.connect(lambda:(startGpressed("Game starting")))
fieldE.clicked.connect(partial(fieldeditorOPEN))
startG.show()
fieldE.show()
sys.exit(app.exec_())
main()
慕码人8056858
相关分类