Using the Reference DocumentationQt's reference documentation is an essential tool for any Qt developer, since it covers every class and function in Qt. (Qt 3.2 includes over 400 public classes and over 6000 functions.) This book makes use of many Qt classes and functions, but it doesn't mention them all, nor does it provide all the details of those it does mention. To get the most benefit from Qt, you should familiarize yourself with the Qt reference documentation.
The documentation is available in HTML format in Qt's doc\html directory and can be read using any web browser. You can also use Qt Assistant , the Qt help browser, whose powerful search and indexing features make it quicker and easier to use than a web browser. To launch Qt Assistant , click Qt 3.2.xQt Assistant in the Start menu on Windows, type assistant on the command line on Unix, or double-click assistant in the Mac OS X Finder. Figure 1.9. Qt's documentation in Qt Assistant
The links in the "API Reference" section on the home page provide different ways of navigating Qt's classes. The "All Classes" page lists every class in Qt's API. The "Main Classes" page lists only the most commonly used Qt classes. As an exercise, you might want to look up the classes and functions that we have used in this chapter. Note that inherited functions are documented in the base class; for example,
QPushButton
has no
show()
function of its own, but it inherits one from its
Figure 1.10. Inheritance tree for the Qt classes seen so far
The reference documentation for the current version of Qt and for some earlier versions is available online at http://doc.trolltech.com/. This site also
|
Chapter 2. Creating Dialogs
This chapter will teach you how to create dialog boxes using Qt. They are called dialog boxes, or simply "dialogs", because they provide a means by which users and applications can "talk to" each other.
Dialogs present users with options and choices, and allow them to set the options to their preferred values and to make their choice. Most GUI applications consist of a main window with a menu bar and toolbar, along with dozens of dialogs that complement the main window. It is also possible to create dialog applications that respond directly to the
We will create our first dialog purely by writing code to show how it is done. Then we will see how to build dialogs using
Qt Designer
, Qt's visual design tool. Using
Qt Designer
is a lot faster than
|

GCC: The Complete Reference

C++ GUI Programming with Qt 4 (2nd Edition) (Prentice Hall Open Source Software Development Series)

Advanced Qt Programming: Creating Great Software with C++ and Qt 4 (Prentice Hall Open Source Software Development)

Partial Differential Equations for Scientists and Engineers (Dover Books on Mathematics)