感谢支持
我们一直在努力

Ubuntu下Qt4开发环境的安装

本文讨论的是从Ubuntu的基础安装,也就是从CD安装盘默认安装后,开发Qt应用所需要的安装包。本文实验环境Ubuntu 9.04-desktop, wubi.exe安装


下面就是需要作的几个步骤


1)sudo apt-get install libqt4-dev
安装完这个包后,你就可以写Qt程序了。libqt4-dev会自动把下面相关的一些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


sudo apt-get install g++ automake
这俩个包并不属于qt包,但是编译Qt的c++编译器需要安装,在g++包里。Qt有自己的编译系统,automake并不是必须的,但有时候需要编译一些第三方的库,所以一般推荐安装上。


3) sudo apt-get install qt4-dev-tools qt4-designer qt4-doc
qt4-dev-tools包含了一些开发用到辅助工具,如帮助系统工具assitant,翻译辅助工具linguist,d-bus查看器,Pixel Tool等。
qt4-designer则会安装GUI设计工具designer
qt4-doc qt4的帮助文件


~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



下面是一些选装的安装包


4) sudo apt-get install libqt4-opengl-dev
Qt4 OpenGL 相关的开发库文件


5) sudo apt-get install libqt4-sql-mysql libqt4-sql-odbc libqt4-sql-psql libqt4-sql-sqlite libqt4-sql-sqlite2
开发数据库所要的一些插件驱动,可选取自己需要的包安装


5.1) sudo install libiodbc2-dev libmysqlclient15-dev libsqlite3-dev
对应步骤5)中的数据库所需的开发库文件


~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

你可能还需要的内容 appendix

a1) sudo aptitude search qt4
这个命令会让你查到和qt4相关的其它内容,比如调试用的符号表文件,pyqt,perlqt等,搜索结果如下
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

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu下Qt4开发环境的安装
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏