Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from PyQt4 import QtGui
- class HelloWorld(QtGui.QWidget):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.parent = parent
- self.initUi()
- def initUi(self):
- self.setWindowTitle(u"Привет мир")
- self.resize(300, 200)
- self.show()
- def paintEvent(self, event):
- p = QtGui.QPainter(self)
- p.drawText(10, 20, u"Привет, мир!")
- if __name__ == '__main__':
- app = QtGui.QApplication([])
- w = HelloWorld()
- app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement