摘要: ``` exit = QtGui.QAction(QtGui.QIcon(':/log.ico'), 'Exit', self) exit.setShortcut('Ctrl+Q') exit.setStatusTip('Exit Application') self.connect(exit, QtCore.SIGNAL('trig... 阅读全文
posted @ 2017-03-30 15:51 idlewith 阅读(130) 评论(0) 推荐(0) 编辑
摘要: ``` def center(self): screen = QtGui.QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2) `... 阅读全文
posted @ 2017-03-30 14:38 idlewith 阅读(245) 评论(0) 推荐(0) 编辑
摘要: ``` def closeEvent(self, QCloseEvent): reply = QtGui.QMessageBox.question(self, 'Message', 'Are you sure to quit?', ... 阅读全文
posted @ 2017-03-30 14:35 idlewith 阅读(571) 评论(0) 推荐(0) 编辑