source: trunk/doc/src/getting-started/examples.qdoc@ 788

Last change on this file since 788 was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

  • Property svn:eol-style set to native
File size: 44.3 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the documentation of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/*!
43 \page examples-overview.html
44 \raw HTML
45 <script>
46 document.location.href = "examples.html";
47 </script>
48 \endraw
49 Click this \l{Qt Examples}{link} if you don't get redirected.
50*/
51
52/*!
53 \page examples.html
54 \title Qt Examples
55 \brief The example programs provided with Qt.
56
57 \previouspage Tutorials
58 \contentspage How to Learn Qt
59 \nextpage Qt Demonstrations
60
61 Qt is supplied with a variety of examples that cover almost every aspect
62 of development. They are not all designed to be impressive when you run
63 them, but their source code is carefully written to show good Qt
64 programming practices. You can launch any of these programs from the
65 \l{Examples and Demos Launcher} application.
66
67 These examples are ordered by functional area, but many examples often
68 use features from many parts of Qt to highlight one area in particular.
69 If you are new to Qt, you should probably start by going through the
70 \l{Tutorials} before you have a look at the
71 \l{mainwindows/application}{Application} example.
72
73 In addition to the examples and the tutorial, Qt includes a
74 \l{Qt Demonstrations}{selection of demos} that deliberately show off
75 Qt's features. You might want to look at these as well.
76
77 \section1 \l{Widgets Examples}{Widgets}
78 \beginfloatleft
79 \l{Widgets Examples}{\inlineimage widget-examples.png
80 }
81
82 \endfloat
83 Qt comes with a large range of standard widgets that users of modern
84 applications have come to expect. You can also develop your own custom
85 widgets and controls, and use them alongside standard widgets.
86
87 It is even possible to provide custom styles and themes for widgets that can
88 be used to change the appearance of standard widgets and appropriately
89 written custom widgets.
90
91 \clearfloat
92 \section1 \l{Dialog Examples}{Dialogs}
93 \beginfloatleft
94 \l{Dialog Examples}{\inlineimage dialog-examples.png
95 }
96
97 \endfloat
98 Qt includes standard dialogs for many common operations, such as file
99 selection, printing, and color selection.
100
101 Custom dialogs can also be created for specialized modal or modeless
102 interactions with users.
103
104 \clearfloat
105 \section1 \l{Main Window Examples}{Main Windows}
106 \beginfloatleft
107 \l{Main Window Examples}{\inlineimage mainwindow-examples.png
108 }
109
110 \endfloat
111 All the standard features of application main windows are provided by Qt.
112
113 Main windows can have pull down menus, tool bars, and dock windows. These
114 separate forms of user input are unified in an integrated action system that
115 also supports keyboard shortcuts and accelerator keys in menu items.
116
117 \clearfloat
118 \section1 \l{Layout Examples}{Layouts}
119 \beginfloatleft
120 \l{Layout Examples}{\inlineimage layout-examples.png
121 }
122
123 \endfloat
124 Qt uses a layout-based approach to widget management. Widgets are arranged in
125 the optimal positions in windows based on simple layout rules, leading to a
126 consistent look and feel.
127
128 Custom layouts can be used to provide more control over the positions and
129 sizes of child widgets.
130
131 \clearfloat
132 \section1 \l{Item Views Examples}{Item Views}
133 \beginfloatleft
134 \l{Item Views Examples}{\inlineimage itemview-examples.png
135 }
136
137 \endfloat
138 Item views are widgets that typically display data sets. Qt 4's model/view
139 framework lets you handle large data sets by separating the underlying data
140 from the way it is represented to the user, and provides support for
141 customized rendering through the use of delegates.
142
143 \clearfloat
144 \section1 \l{Graphics View Examples}{Graphics View}
145 \beginfloatleft
146 \l{Graphics View Examples}{\inlineimage graphicsview-examples.png
147 }
148
149 \endfloat
150 Qt is provided with a comprehensive canvas through the GraphicsView
151 classes.
152
153 \clearfloat
154 \section1 \l{Painting Examples}{Painting}
155 \beginfloatleft
156 \l{Painting Examples}{\inlineimage painting-examples.png
157 }
158
159 \endfloat
160 Qt's painting system is able to render vector graphics, images, and outline
161 font-based text with sub-pixel accuracy accuracy using anti-aliasing to
162 improve rendering quality.
163
164 \clearfloat
165 \section1 \l{Rich Text Examples}{Rich Text}
166 \beginfloatleft
167 \l{Rich Text Examples}{\inlineimage richtext-examples.png
168 }
169
170 \endfloat
171 Qt provides powerful document-oriented rich text engine that supports Unicode
172 and right-to-left scripts. Documents can be manipulated using a cursor-based
173 API, and their contents can be imported and exported as both HTML and in a
174 custom XML format.
175
176 \clearfloat
177 \section1 \l{Desktop Examples}{Desktop}
178 \beginfloatleft
179 \l{Desktop Examples}{\inlineimage desktop-examples.png
180 }
181
182 \endfloat
183 Qt provides features to enable applications to integrate with the user's
184 preferred desktop environment.
185
186 Features such as system tray icons, access to the desktop widget, and
187 support for desktop services can be used to improve the appearance of
188 applications and take advantage of underlying desktop facilities.
189
190 \clearfloat
191 \section1 \l{Drag and Drop Examples}{Drag and Drop}
192 \beginfloatleft
193 \l{Drag and Drop Examples}{\inlineimage draganddrop-examples.png
194 }
195
196 \endfloat
197 Qt supports native drag and drop on all platforms via an extensible
198 MIME-based system that enables applications to send data to each other in the
199 most appropriate formats.
200
201 Drag and drop can also be implemented for internal use by applications.
202
203 \clearfloat
204 \section1 \l{Threading and Concurrent Programming Examples}{Threading and Concurrent Programming}
205 \beginfloatleft
206 \l{Threading and Concurrent Programming Examples}{\inlineimage thread-examples.png
207 }
208
209 \endfloat
210 Qt 4 makes it easier than ever to write multithreaded applications. More
211 classes have been made usable from non-GUI threads, and the signals and slots
212 mechanism can now be used to communicate between threads.
213
214 The QtConcurrent namespace includes a collection of classes and functions
215 for straightforward concurrent programming.
216
217 \clearfloat
218 \section1 \l{Tools Examples}{Tools}
219 \beginfloatleft
220 \l{Tools Examples}{\inlineimage tool-examples.png
221 }
222
223 \endfloat
224 Qt is equipped with a range of capable tool classes, from containers and
225 iterators to classes for string handling and manipulation.
226
227 Other classes provide application infrastructure support, handling plugin
228 loading and managing configuration files.
229
230 \clearfloat
231 \section1 \l{Network Examples}{Network}
232 \beginfloatleft
233 \l{Network Examples}{\inlineimage network-examples.png
234 }
235
236 \endfloat
237 Qt is provided with an extensive set of network classes to support both
238 client-based and server side network programming.
239
240 \clearfloat
241 \section1 \l{Inter-Process Communication Examples}{Inter-Process Communication}
242 \beginfloatleft
243 \l{Inter-Process Communication Examples}{\inlineimage ipc-examples.png
244 }
245
246 \endfloat
247 Simple, lightweight inter-process communication can be performed using shared
248 memory and local sockets.
249
250 \clearfloat
251 \section1 \l{OpenGL Examples}{OpenGL} and \l{OpenVG Examples}{OpenVG} Examples
252 \beginfloatleft
253 \l{OpenGL Examples}{\inlineimage opengl-examples.png
254 }
255
256 \endfloat
257 Qt provides support for integration with OpenGL implementations on all
258 platforms, giving developers the opportunity to display hardware accelerated
259 3D graphics alongside a more conventional user interface.
260
261 Qt provides support for integration with OpenVG implementations on
262 platforms with suitable drivers.
263
264 \clearfloat
265 \section1 \l{Multimedia Examples}{Multimedia Framework}
266 \beginfloatleft
267 \l{Multimedia Examples}{\inlineimage phonon-examples.png
268 }
269
270 \endfloat
271 Qt provides low-level audio support on linux,windows and mac platforms by default and
272 an audio plugin API to allow developers to implement there own audio support for
273 custom devices and platforms.
274
275 The Phonon Multimedia Framework brings multimedia support to Qt applications.
276
277 \clearfloat
278 \section1 \l{SQL Examples}{SQL}
279 \beginfloatleft