usr bin env python coding utf-8 import sys from PyQt4 import QtGui cla

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui
class Window(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setGeometry(300,200,300,160)
self.setWindowTitle('TA DA!')
self.setToolTip('This is <b>My first</b> widget')
QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish',10))
app = QtGui.QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec_())