2011年2月9日 星期三
2010年12月16日 星期四
helloworld.py
import sys from PyQt4.QtGui import * app = QApplication(sys.argv) button = QPushButton("Hello World", None) button.show() app.exec_() 執行 python helloworld.py
test1
#include
#include
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.show();
return app.exec();
}
然後依序執行以下指令,Makefile會自動產生
$ qmake -project
$ qmake
$ make
編譯完成
#include
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.show();
return app.exec();
}
然後依序執行以下指令,Makefile會自動產生
$ qmake -project
$ qmake
$ make
編譯完成
PyQt4
Ubuntu 10.04
安裝Qt4
$ sudo apt-get install libqt4-dev libqt4-dbg libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig
安裝PyQt4
$ sudo apt-get install "python-qt4-*"
PyQt4範例
/usr/share/doc/python-qt4-doc/examples
安裝Qt4
$ sudo apt-get install libqt4-dev libqt4-dbg libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig
安裝PyQt4
$ sudo apt-get install "python-qt4-*"
PyQt4範例
/usr/share/doc/python-qt4-doc/examples
訂閱:
文章 (Atom)