初始化
self.connect(self,QtCore.SIGNAL('closeEmitAPP()'),QtCore.SLOT('close()'))
函数
def keyPressEvent(self,event):
if event.key()==QtCore.Qt.Key_Escape:
self.close()
ESC退出程序
最新推荐文章于 2024-07-03 23:39:01 发布
初始化
self.connect(self,QtCore.SIGNAL('closeEmitAPP()'),QtCore.SLOT('close()'))
函数
def keyPressEvent(self,event):
if event.key()==QtCore.Qt.Key_Escape:
self.close()