How to install pyqt4 on ubuntu
Install and run "hello world" example
  • apt-cache search pyqt
  • sudo apt-get install python-qt4
  • Create a file ~/tmp/helloworld.py
    import sys
    from PyQt4.QtGui import *
    app = QApplication(sys.argv)
    button = QPushButton("Hello World", None)
    button.show()
    app.exec_()
    
  • Run it:
    python ~/tmp/helloworld.py
    You should see a window with a single button pop up.

Install additional examples
  • For more examples, install the python-qt4-doc package:
    sudo apt-get install python-qt4-doc
  • After installation, the examples are located at:
    /usr/share/doc/python-qt4-doc/examples
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

How to install pyqt4 on ubuntu

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭