How to install pyqt4 on ubuntu
2013-12-06 10:59
267 查看
Install and run "hello world" example
Create a file
Run it:
You should see a window with a single button pop up.
Install additional examples
For more examples, install the
After installation, the examples are located at:
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-docpackage:
sudo apt-get install python-qt4-doc
After installation, the examples are located at:
/usr/share/doc/python-qt4-doc/examples
相关文章推荐
- Installing Tomcat 6 on Ubuntu
- How to Install Pygame to Python 3 on Ubuntu
- nstalling PHP 5.3 On Ubuntu
- Subversion over Apache 2 on Ubuntu
- A taste of Oracle 10 on Ubuntu
- Install Qt 5 on Ubuntu
- 无法安装或删除任何dtb程序 on Ubuntu
- Install JDK8 on Ubuntu
- “What is the location of the directory of C header files that match your running kernel?” On Ubuntu
- Installing Intellij IDEA sublime-text-2 on Ubuntu
- Install JDK 7 on Ubuntu
- Use Apache2 on Ubuntu
- jdk7 on ubuntu
- Installing maven 3.3.3 on Ubuntu
- Install NS2 on Ubuntu
- Install Qt 5 on Ubuntu
- Pygame_How to Install Pygame to Python 3 on Ubuntu
- Install Redis 3.2 on Ubuntu
- on Ubuntu 12.04 to install and setup the tomcat 7
- Installing Oracle 11g on Ubuntu