C++ GUI Programming With Qt 4: Blanchette, Jasmin, Summerfield, Mark: 9780131872493: Amazon.com: Books (original) (raw)

Jasmin Blanchette, Trolltech's documentation manager and a senior developer, has worked at Trolltech since 2001. He is editor of Qt Quarterly, Trolltech's technical newsletter, and coauthored C++ GUI Programming with Qt 3.

Mark Summerfield works as an independent trainer and consultant specializing in C++, Qt, and Python. He was Trolltech's documentation manager for almost three years and coauthored C++ GUI Programming with Qt 3.

Qt is a comprehensive C++framework for developing cross-platform GUI applications using a "write once, compile anywhere" approach. Qt lets programmers use a single source tree for applications that will run on Windows 98 to XP, Mac OS X, Linux, Solaris, HP-UX, and many other versions of Unix with X11. The Qt libraries and tools are also part of Qtopia Core, a product that provides its own window system on top of embedded Linux.

The purpose of this book is to teach you how to write GUI programs using Qt 4. The book starts with "Hello Qt" and quickly progresses to more advanced topics, such as creating custom widgets and providing drag and drop. The text is complemented by a CD that contains the source code of the example programs. The CD also includes the open source edition of Qt 4.1.1 for all supported platforms, as well as MinGW, a set of freely available development tools that can be used to build Qt applications on Windows. Appendix A explains how to install the software.

The book is divided into three parts. Part I covers all the concepts and practices necessary for programming GUI applications using Qt. Knowledge of this part alone is sufficient to write useful GUI applications. Part II covers central Qt topics in greater depth, and Part III provides more specialized and advanced material. The chapters of Parts II and III can be read in any order, but they assume familiarity with the contents of Part I.

Readers of the Qt 3 edition of this book will find this new edition familiar in both content and style. This edition has been updated to take advantage of Qt 4's new features (including some that were introduced with Qt 4.1) and to present code that shows good idiomatic Qt 4 programming techniques. In many cases, we have used examples similar to the ones used in the Qt 3 edition. This will not affect new readers, but will help those who read the previous edition orient themselves to Qt 4's cleaner, clearer, and more expressive style.

This edition includes new chapters covering Qt 4's model/view architecture, the new plugin framework, and embedded programming with Qtopia, as well a new appendix. And just like the Qt 3 book, the emphasis is on explaining Qt programming rather than simply rehashing or summarizing Qt's extensive online documentation.

We have written the book with the assumption that you have a basic knowl*edge of C++, Java, or C#. The code examples use a subset of C++, avoiding many C++ features that are rarely needed when programming Qt. In the few places where a more advanced C++ construct is unavoidable, it is explained where it is used.

If you already know Java or C# but have little or no experience with C++, we recommend that you begin by reading Appendix B, which provides sufficient introduction to C++ to be able to use this book. For a more thorough introduction to object-oriented programming in C++, we recommend C++ How to Program by Harvey Deitel and Paul Deitel, and the C++ Primer by Stanley B. Lippman, Josee Lajoie, and Barbara E. Moo.

Qt made its reputation as a cross-platform framework, but because of its intuitive and powerful API, many organizations use Qt for single-platform development. Adobe Photoshop Album is just one example of a mass-market Windows application written in Qt. Many sophisticated software systems in vertical markets, such as 3D animation tools, digital film processing, electronic design automation (for chip design), oil and gas exploration, financial services, and medical imaging, are built with Qt. If you are making a living with a successful Windows product written in Qt, you can easily create new markets in the Mac OS X and Linux worlds simply by recompiling.

Qt is available under various licenses. If you want to build commercial applications, you must buy a commercial Qt license; if you want to build open source programs, you can use the open source (GPL) edition. Qt is the foundation on which the K Desktop Environment (KDE) and the many open source applications that go with it are built.

In addition to Qt's hundreds of classes, there are add-ons that extend Qt's scope and power. Some of these products, like Qt Script for Applications (QSA) and the Qt Solutions components, are available from Trolltech, while others are supplied by other companies and by the open source community. See http://www.trolltech.com/products/3rdparty/ for information on Qt add-ons. Qt also has a well-established and thriving user community that uses the qt-interest mailing list; see http://lists.trolltech.com/ for details.