Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
Installing
sudo apt-get install python-qt4 libxml2-dev libxslt1-dev python-dev python-lxml xvfb
Create hello.py file
touch hello.py
hello.py source code
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui
def window():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
b = QtGui.QLabel(w)
b.setText("Hello World!")
w.setGeometry(100,100,200,50)
b.move(50,20)
w.setWindowTitle("PyQt")
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
window()
execute hello.py
python hello.py
Add Comment
Please, Sign In to add comment