本文整理汇总了Python中PyQt4.QtGui.QSystemTrayIcon.supportsMessages方法的典型用法代码示例。如果您正苦于以下问题:Python QSystemTrayIcon.supportsMessages方法的具体用法?Python QSystemTrayIcon.supportsMessages怎么用?Python QSystemTrayIcon.supportsMessages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QSystemTrayIcon
的用法示例。
在下文中一共展示了QSystemTrayIcon.supportsMessages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sysBaloon
# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import supportsMessages [as 别名]
class sysBaloon(QMainWindow):
def baloon(self, t, m, tm=50000):
self.trayicon = QSystemTrayIcon(self)
if self.trayicon.supportsMessages():
icona = QIcon('py.ico')
self.trayicon.setIcon(icona)
self.trayicon.show()
self.trayicon.showMessage(t, m, msecs=tm)
time.sleep(10)
self.trayicon.hide()
else:
print "This Function isn't supported."
choose = raw_input("Would you enable it? Y/N \n --> ")
if choose == "Y":
shell = os.popen('enable_baloon.reg')
print "Run again this program"
elif choose == "N":
print "You don't use this program without baloon enabled."
else:
print "You have insert wrong char."