|
|
(未显示4个用户的11个中间版本) |
第1行: |
第1行: |
| 编辑中
| | #REDIRECT [[Qt]] |
| | |
| | |
| Qt是跨平台的C++图形开发框架,发家史/辛酸史详细去看[http://zh.wikipedia.org/wiki/Qt wikipedia],KDE环境就是用Qt开发的,最新的版本是Qt4.5.1。
| |
| | |
| =编译环境=
| |
| == Hello World ==
| |
| <source lang="cpp">
| |
| #include <QtGui/QApplication>
| |
| #include <QtGui/QLabel>
| |
|
| |
| int main(int argc, char *argv[])
| |
| {
| |
| QApplication app(argc, argv);
| |
| QLabel label("Hello, world!");
| |
| label.show();
| |
| return app.exec();
| |
| }
| |
| | |
| </source>
| |
| | |
| qmake -project <br />
| |
| | |
| qmake<br />
| |
| | |
| make
| |
| | |
| = Qtcreator =
| |
| | |
| Qt4.5后 附带的轻量级IDE开发环境。
| |
| | |
| [[Image:Qtcreator.png]]
| |
| | |
| == 安装 ==
| |
| | |
| *从 '''[[UbuntuHelp:SynapticHowto/zh|新利得软件包管理器]][[UbuntuHelp:Synaptic|Synaptic]]'''或者[[Kpackagekit|KPackageKit(Kubuntu默认的软件管理)]] 中搜索qt-creator,选择安装<br />
| |
| *Firefox浏览器地址栏中输入apt:qt-creator
| |
| *从 apt-get 命令安装:<br />
| |
| <pre>sudo apt-get install qt-creator
| |
| </pre>
| |
| <br />
| |
| | |
| == 中文界面 ==
| |
| | |
| 如果安装的qtcreator是显示英文菜单,需要安装KDE的中文包才能显示中文菜单。
| |
| <pre>sudo apt-get install language-pack-kde-zh language-pack-kde-zh-base
| |
| </pre>
| |
| === 待编辑 ===
| |
| | |
| == 编译环境 ==
| |
| 安装KDE 开发环境:
| |
| sudo aptitude install kde-devel build-essential xorg-dev cdbs debhelper cmake \
| |
| kdesdk-scripts subversion ssh xserver-xephyr doxygen dbus-x11 \
| |
| libxml2-dev libxslt1-dev shared-mime-info libical-dev libgif-dev libssl-dev \
| |
| libboost-dev libboost-program-options-dev libgpgme11-dev libxine-dev \
| |
| libqimageblitz-dev libbz2-dev libdbus-1-dev libpam0g-dev libpcre3-dev \
| |
| libkrb5-dev libsm-dev libclucene0ldbl libclucene-dev libjpeg62-dev \
| |
| libxtst-dev xsltproc libxrender-dev libfontconfig1-dev automoc4
| |
| | |
| == Hello World ==
| |
| | |
| =KDevelop=
| |
| KDE开发的IDE,最新的稳定版是qt3.5做的,移植qt4的还在开发中。
| |
| | |
| ==安装==
| |
| *从 '''[[UbuntuHelp:SynapticHowto/zh|新利得软件包管理器]][[UbuntuHelp:Synaptic|Synaptic]]'''或者[[Kpackagekit|KPackageKit(Kubuntu默认的软件管理)]] 中搜索kdevelop,选择安装<br>
| |
| *Firefox浏览器地址栏中输入apt:kdevelop
| |
| *从 apt-get 命令安装:<br>
| |
| <pre>sudo apt-get install kdevelop
| |
| </pre>
| |
| <br />
| |
| | |
| === KDE 4版本 ===
| |
| *从[[UbuntuHelp:Synaptic|Synapitc]]或[[Kpackagekit|KPackageKit]]里搜索'''kdevelop-kde4'''(如果是Karmic Koala,就是kdevelop),安装<br />
| |
| *Firefox浏览器地址栏中输入apt:kdevelop-kde4(如果是Karmic Koala,就是kdevelop)
| |
| *命令安装:<br />
| |
| sudo aptitude install kdevelop-kde4 #(如果是Karmic Koala,就是kdevelop)
| |
| | |
| == 中文界面 ==
| |
| | |
| 如果安装的qtcreator是显示英文菜单,需要安装KDE的中文包才能显示中文菜单。
| |
| <pre>sudo apt-get install language-pack-kde-zh language-pack-kde-zh-base
| |
| </pre>
| |
| | |
| =Monkeystudio=
| |
| 轻量级的IDE,[http://www.monkeystudio.org/ monkeystudio官网]
| |
| | |
| =Netbean=
| |
| =Eclipse=
| |
| | |
| | |
| | |
| = 外部链接 =
| |
| | |
| [http://zh.wikipedia.org/wiki/Qt 维基百科对Qt的介绍]
| |
| | |
| === 官方 ===
| |
| | |
| [http://www.qtsoftware.com/ Qt官方主页]
| |
| | |
| [http://qt.gitorious.org/ Qt 源代码]
| |
| | |
| [http://labs.trolltech.com/page/Overview Qt 实验室]
| |
| | |
| [http://doc.trolltech.com/ Qt 在线文档]
| |
| | |
| === 教学与参考文件 ===
| |
| | |
| [http://caterpillar.onlyfun.net/Gossip/Qt4Gossip/Qt4Gossip.html Qt4 學習筆記]
| |
| | |
| [http://program-lover.blogspot.com/2008/08/qt.html Qt 教學]
| |
| | |
| [http://thelins.se/learnqt/ learnqt英文blog] | |
| | |
| === 论坛 ===
| |
| | |
| [http://qtcentre.org/ Qt 社群網站] | |
| | |
| [http://groups.google.com/group/qt-china google论坛]
| |
| | |
| [http://groups.google.com/group/qt-china Qt中文邮件列表]
| |
| | |
| [http://www.qtopia.org.cn/phpBB2/ Qt/Qtopia中文论坛]
| |
| | |
| [http://www.qtcn.org/ Qt中文论坛]
| |
| [http://www.qtkbase.com/ 另一个Qt中文论坛]
| |
| [http://www.qteverywhere.com/ Qt Everywhere]
| |
| | |
| === Planet ===
| |
| | |
| [http://www.planetqt.org/ planetqt] [http://planetkde.org/ planetkde]
| |
| | |
| === 书籍 ===
| |
| | |
| [http://www.douban.com/subject/3173123/ 《C++ GUI Qt4 编程(第二版)》]
| |