usr bin python coding UTF-8 import sys os from PyQt4 QtCore import fro

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys, os
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Form(QDialog):
def __init__(self,parent=None):
super(Form, self).__init__(parent)
os.system('kdialog \
--title "This is a passive popup" \
--passivepopup "It will disappear in about 10 seconds" 2')
self.tray_icon = QSystemTrayIcon()
self.tray_icon.setIcon(QIcon('icon.png'))
self.tray_icon.show()
self.tray_icon.toolTip()
self.tray_icon.showMessage('It\'s me', 'Hello world!')
app = QApplication(sys.argv)
form = Form()
form.show()
sys.exit(app.exec_())