首先安装Qt开发包
#$ sudo apt-get install qt4-dev-tools
下载并安装SIP(SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries. )
#$ wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.14.4/sip-4.14.4.tar.gz
#$ tar vxf sip-4.14.4.tar.gz
#$ cd sip-4.14.4
#$ python configure.py
#$ make all
#$ sudo make install
下载安装PyQt (raspberry 性能有限,安装需要很长时间)
#$ wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10/PyQt-x11-gpl-4.10.tar.gz
#$ tar vxf PyQt-x11-gpl-4.10.tar.gz
#$ cd PyQt-x11-gpl-4.10
#$ python configure.py
#$ make all #整个编译大约需要4个小时!
#$ sudo make install
运行demo程序
cd PyQt-x11-gpl-4.10/examples/demos/qtdemo
python qtdemo.py
简单测试了一下,部分Qt组件在raspberry pi下不能用。