没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
44页
Qt is the toolkit used by the KDE project for developing graphical applications. This <br>paper shows a beginner how to create a simple application using Qt Designer 3.2 and <br>KDevelop-3.0 (aka Gideon at the moment). This tutorial is based on an application <br>written by Jono Bacon and has been reviewed by Daniel Molkentin (for the KDevelop2 <br>version) and Thomas Nagy.
资源推荐
资源详情
资源评论
Qt Designer and KDevelop-3.0 for
beginners
Anne-Marie Mahfouf <annma@kde.org>
German Translation : Andreas Nicolai
Russian Translation : Marina Soboleva
Revision 0.4
Copyright 2001, 2003 Anne-Marie Mahfouf
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free
Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in
the section entitled "GNU Free Documentation License".
Qt is the toolkit used by the KDE project for developing graphical applications. This
paper shows a beginner how to create a simple application using Qt Designer 3.2 and
KDevelop-3.0 (aka Gideon at the moment). This tutorial is based on an application
written by Jono Bacon and has been reviewed by Daniel Molkentin (for the KDevelop2
version) and Thomas Nagy.
Table of Contents
1. 1.
Introduction
2. 2.
Requirements
How to get Qt Designer
From your distribution
Tarball or anonymous cvs
How to get KDevelop 3
From your distribution
From tarball
cvs HEAD
Lexicon
3. Creating the application
Starting the project Creating the framework with KDevelop Using Qt Designer
Designing the program
Adding widgets
Getting spaced out
Signals and slots
Generating the source
Implementing the slot
1. 4. In short
2. 5. Make the translations for a simple kde project First install a gettext patched for
kde Prepare the translations Make the translations Compile and install the translations
files Reference
3. 6. A few general tips
General hints
Your application name
Coding practice
Importing your project in KDE CVS
How do I release my application as a tarball?
Useful links
1. 7. Generating the source (alternate) Without using the KDevelop subclassing
capability Implementing the slot
2. 8.
Credits and License
Chapter 1. Introduction
To get us started doing something useful with Qt Designer, we are going to build a
simple program that will show you the power of Qt Designer and KDevelop. I hope that
this will help you to create your first "real" KDE application.
If you are already familiar with KDevelop and Qt Designer and you only want to know
how they work together, go straight to the last chapter where the procedure is
explained very quickly.
KDevelop will help you to build a complete KDE application. The KDE project uses
the autoconf and automake tools and KDevelop will provide you all the necessary
files (admin directory, Makefile.cvs, Makefile.am,...).
Chapter 2. Requirements
You will need Qt Designer and KDevelop for this tutorial, as well as the KDE 3.1. x
libraries installed. We will build a simple KDE3 program that takes a name, an email
address and a comment and generates a signature for an email.
How to get Qt Designer
From your distribution
Qt Designer is part of the qt-3.1.x package and above. If you have an older Qt on
your system, you should get at least this version. At the time of writing, Qt version is
3.2.
Please remember to check if you have all the qt-related packages installed. You need
the qt headers in order to compile this tutorial application. These headers usually come
in the devel package. You also need to be sure you have designer. In some
distributions, it comes in a separate package.
To check if you have everything, do a
locate qstring.h
If you get something like /usr/lib/qt3/include/qstring.h then you can set
your QTDIR variable to /usr/lib/qt3/. In bash environment, this is done by typing
export QTDIR= /usr/lib/qt3
Tarball or anonymous cvs
You can download the tarball from the Trolltech website or also get the qt-copy
module from cvs. Please note that Qt for Linux is GPL.
For an explanation for how to use anonymous cvs, get the qt-copy and kde
modules and compile them, please see a great documentation
here.
You must then set the QTDIR environment variable. This should point to the
directory into which you installed Qt. In bash, for example, you would type:
export QTDIR= /usr/local/qt
provided that /usr/local/qt is the directory into which you installed Qt. Please read the
INSTALL file for more details.
You then compile by issuing the following commands, here is the recommended
compile line:
The command make install is not needed.
Qt Designer is located in the bin directory of your Qt installation directory. You can run
it by typing
/usr/local/qt/bin/designer
in a console.
Please see
here for a detailed explanation of how to compile Qt from a tarball.
How to get KDevelop 3
From your distribution
KDevelop 3 is nicknamed Gideon and will reverse to the kdevelop name when there
is a stable release. That means that the binary file is named Gideon. In some
distributions, you will find the package under the name of Gideon or the name of
KDevelop-3.
If you cannot find KDevelop-3 for your distribution, please see the next section to get it
from source and to compile it.
From tarball
KDevelop can be downloaded from the KDevelop website in the section Download
to find the nearest mirror. At the time of writing, latest KDevelop 3.0 source version
is Alpha4a. Latest packages are Alpha 4. See the KDevelop website,
download
section
, to get them.
To compile KDevelop 3: you need qt-3.1.0 or higher and kdelibs-3.1.0 or higher. The
environment variables QTDIR and KDEDIR should point to those directories.
Don't forget to set up the KDE and QT paths. The most common errors while using
KDevelop come from the environment variables not set up properly. Check in a
console by issuing the command 'set' to see all your environment variables. You
should set your PATH variable as follow as well as your LD_LIBRARY_PATH: If you
have any problem getting KDevelop running, please follow the forum link from the
KDevelop website to find the answer of your problem.
If you never used KDevelop before, try to create a new project and to compile it to get
used to the interface and the icons.
cvs HEAD
A brief section for those you would like to get the last thing available! And KDevelop
from CVS is really worth the download. You need qt-3.1.0 or higher and kdelibs-3.1.0
or higher.
剩余43页未读,继续阅读
资源评论
- AndroLi2012-02-24英文版,需要啃。
大招至胜
- 粉丝: 741
- 资源: 24
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功