コード例 #1
0
ファイル: timerapp.py プロジェクト: steelsoul/hide_to_tray
	def on_timeout(self):
		self.systemTrayIcon.setToolTip("TImeout")
		self.reset_timer()
		msgBox = QMessageBox(QMessageBox.Information,
			"== Notification ==",
			"On timer!",
			QMessageBox.NoButton,
			None)
		screenrect = QDesktopWidget().screen().rect()
		msgBox.move(QPoint(screenrect.width() / 2 - msgBox.sizeHint().width() / 2,
			screenrect.height() / 2 - msgBox.sizeHint().height() / 2))
		msgBox.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
		msgBox.exec_()