本文討論的是從Ubuntu的基礎(chǔ)安裝,也就是從CD安裝盤默認(rèn)安裝后,開(kāi)發(fā)Qt應(yīng)用所需要的安裝包。本文實(shí)驗(yàn)環(huán)境Ubuntu 9.04-desktop, wubi.exe安裝
下面就是需要作的幾個(gè)步驟
1)sudo apt-get install libqt4-dev
安裝完這個(gè)包后,你就可以寫Qt程序了。libqt4-dev會(huì)自動(dòng)把下面相關(guān)的一些qt4包安裝上,例如:
libqt4-assistant libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4
2) sudo apt-get install g++ automake
這倆個(gè)包并不屬于qt包,但是編譯Qt的c++編譯器需要安裝,在g++包里。Qt有自己的編譯系統(tǒng),automake并不是必須的,但有時(shí)候需要編譯一些第三方的庫(kù),所以一般推薦安裝上。
3) sudo apt-get install qt4-dev-tools qt4-designer qt4-doc
qt4-dev-tools包含了一些開(kāi)發(fā)用到輔助工具,如幫助系統(tǒng)工具assitant,翻譯輔助工具linguist,d-bus查看器,Pixel Tool等。
qt4-designer則會(huì)安裝GUI設(shè)計(jì)工具designer
qt4-doc qt4的幫助文件
————————————-
下面是一些選裝的安裝包
4) sudo apt-get install libqt4-opengl-dev
Qt4 OpenGL 相關(guān)的開(kāi)發(fā)庫(kù)文件
5) sudo apt-get install libqt4-sql-mysql libqt4-sql-odbc libqt4-sql-psql libqt4-sql-sqlite libqt4-sql-sqlite2
開(kāi)發(fā)數(shù)據(jù)庫(kù)所要的一些插件驅(qū)動(dòng),可選取自己需要的包安裝
5.1) sudo install libiodbc2-dev libmysqlclient15-dev libsqlite3-dev
對(duì)應(yīng)步驟5)中的數(shù)據(jù)庫(kù)所需的開(kāi)發(fā)庫(kù)文件
————————————-
你可能還需要的內(nèi)容 appendix
a1) sudo aptitude search qt4
這個(gè)命令會(huì)讓你查到和qt4相關(guān)的其它內(nèi)容,比如調(diào)試用的符號(hào)表文件,pyqt,perlqt等,搜索結(jié)果如下
p ffado-mixer-qt4 – FFADO D-Bus mixer applets (QT4)
p ibus-qt4 – New input method framework using dbus
p libavahi-qt4-1 – Avahi Qt 4 integration library
p libavahi-qt4-dev – Development headers for the Avahi Qt 4 inte
p libpoppler-qt4-3 – PDF rendering library (Qt 4 based shared li
p libpoppler-qt4-dev – PDF rendering library — development files
p libqt4-assistant – Qt 4 assistant module
p libqt4-core – transitional package for Qt 4 core non-GUI
p libqt4-dbg – Qt 4 library debugging symbols
p libqt4-dbus – Qt 4 D-Bus module
p libqt4-designer – Qt 4 designer module
p libqt4-dev – Qt 4 development files
p libqt4-dev-dbg – Qt 4 development files debugging symbols
p libqt4-gui – transitional package for Qt 4 GUI runtime l
p libqt4-help – Qt 4 help module
p libqt4-network – Qt 4 network module
p libqt4-opengl – Qt 4 OpenGL module
p libqt4-opengl-dev – Qt 4 OpenGL library development files
p libqt4-qt3support – Qt 3 compatibility library for Qt 4
p libqt4-ruby – ruby bindings for the Qt4 GUI library
p libqt4-ruby1.8 – Qt 4 bindings for Ruby
p libqt4-ruby1.8-dev – Qt 4 bindings for Ruby – development files
p libqt4-ruby1.8-examples – Qt 4 bindings for Ruby – example files
p libqt4-script – Qt 4 script module
p libqt4-scripttools – Qt 4 script tools module
p libqt4-sql – Qt 4 SQL module
p libqt4-sql-mysql – Qt 4 MySQL database driver
p libqt4-sql-odbc – Qt 4 ODBC database driver
p libqt4-sql-psql – Qt 4 PostgreSQL database driver
p libqt4-sql-sqlite – Qt 4 SQLite 3 database driver
p libqt4-sql-sqlite2 – Qt 4 SQLite 2 database driver
p libqt4-svg – Qt 4 SVG module
p libqt4-test – Qt 4 test module
p libqt4-webkit – Qt 4 WebKit module
p libqt4-webkit-dbg – Qt 4 WebKit library debugging symbols
p libqt4-xml – Qt 4 XML module
p libqt4-xmlpatterns – Qt 4 XML patterns module
p libqt4-xmlpatterns-dbg – Qt 4 XML patterns library debugging symbols
p libqwt5-qt4 – Qt4 widgets library for technical applicati
p libqwt5-qt4-dev – Qt4 widgets library for technical applicati
p libqwtplot3d-qt4 – 3D plotting library based on Qt4/OpenGL (ru
p libqwtplot3d-qt4-dev – 3D plotting library based on Qt4/OpenGL (de
p libsmokeqt4-2 – SMOKE Binding Library to Qt 4
p libsmokeqt4-2-dev – SMOKE Binding Library to Qt 4 – Development
p libsoqt4-20 – Qt4 GUI component toolkit for Inventor – ru
p libsoqt4-dev – Qt4 GUI component toolkit for Inventor – de
p libtulip-qt4-3.0-dev – Tulip graph library – Qt/OpenGL GUI develop
p libtulip-qt4-3.0.0b6 – Tulip graph library – Qt/OpenGL GUI runtime
p libvtk5-qt4 – Visualization Toolkit – A high level 3D vis
p libvtk5-qt4-dev – Visualization Toolkit – A high level 3D vis
p libzlui-qt4 – Qt4 interface module for ZLibrary
p lsb-qt4 – Linux Standard Base 3.2 Qt4 support package
v lsb-qt4-ia32 -
v lsb-qt4-noarch -
p pinentry-qt4 – Qt-4-based PIN or pass-phrase entry dialog
p pyqt4-dev-tools – Development tools for PyQt4
p python-qt4 – Python bindings for Qt4
p python-qt4-common – Shared files for PyQt4
p python-qt4-dbg – Python bindings for Qt4 (debug extensions)
p python-qt4-dbus – DBus Support for PyQt4
p python-qt4-dbus-dbg – DBus Support for PyQt4 (debug extensions)
p python-qt4-dev – Development files for PyQt4
p python-qt4-doc – Documentation and examples for PyQt4
p python-qt4-gl – Python bindings for Qt4’s OpenGL module
p python-qt4-gl-dbg – Python bindings for Qt4’s OpenGL module (de
p python-qt4-phonon – Python bindings for Phonon
p python-qt4-phonon-dbg – Python bindings for Phonon (debug extension
p python-qt4-sql – Python bindings for PyQt4’s SQL module
p python-qt4-sql-dbg – Python bindings for PyQt4’s SQL module (deb
p python-qwt3d-qt4 – Python bindings of the QwtPlot3D library
p python-qwt5-qt4 – Python version of the Qwt5 technical widget
v python2.5-qt4 -
v python2.5-qt4-dbus -
v python2.5-qt4-dbus-dbg -
v python2.5-qt4-gl -
v python2.5-qt4-phonon -
v python2.5-qt4-phonon-dbg -
v python2.5-qt4-sql -
v python2.6-qt4 -
v python2.6-qt4-dbus -
v python2.6-qt4-dbus-dbg -
v python2.6-qt4-gl -
v python2.6-qt4-phonon -
v python2.6-qt4-phonon-dbg -
v python2.6-qt4-sql -
p qt4-demos – Qt 4 examples and demos
p qt4-demos-dbg – Qt 4 examples and demos debugging symbols
p qt4-designer – graphical designer for Qt 4 applications
p qt4-dev-tools – Qt 4 development tools
p qt4-dev-tools-dbg – Qt 4 development tools debugging symbols
p qt4-doc – Qt 4 API documentation
p qt4-doc-html – Qt 4 API documentation (HTML format)
p qt4-qmake – Qt 4 qmake Makefile generator tool
p qt4-qtconfig – Qt 4 configuration tool
p scim-bridge-client-qt4 – IME server of scim-bridge communicate with