歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu7.10下安裝Qt4開發環境

Ubuntu7.10下安裝Qt4開發環境

日期:2017/2/28 17:06:32   编辑:Linux教程

Ubuntu下安裝Qt4可以通過新得立軟件包管理器(或者命令行apt)很方便的實現。

1.所需要的包

libqt4-debug
libqt4-gui
libqt4-qt3support
libqt4-sql
qt4-designer
qt4-dev-tools
qt4-doc
qt4-qtconfig

推薦安裝前刪除已安裝的老版本

2.安裝c++編譯器

build-essential

3.ctags

exuberant-ctags代碼補全

4.QDevelop
免費的IDE
http://qdevelop.free.fr/
可以得到執行安裝文件或者原代碼。因為這個開發環境是通過qt實現的,對學習qt也有幫助

5."Hallo World"
通過菜單Project->new project創建一個新工程

執行

#include <QApplication>
#include <QPushButton>
int main( int argc, char *argv[] )
{
QApplication app( argc, argv );
QPushButton hello( "Hallo Welt!" );
hello.resize( 100, 30 );
hello.show();
return app.exec();
}

Copyright © Linux教程網 All Rights Reserved