Programming with Qt

Writing Portable GUI Applications on UNIX and Win32

Matthias Kalle Dalheimer

Publisher: O'Reilly, 1999, 361 pages

ISBN: 1-56592-588-2

Keywords: Programming

Last modified: Feb. 1, 2014, 1:54 p.m.

Qt is a C++ class library for writing GUI applications that run on Linux, commercial Unix, Windows 95/98, and Windows NT platforms. Qt is much easier to use than the standard Motif toolkit for Unix systems, but at the same time Qt emulates the look-and-feel of Motif. Best of all, after you have written an application with Qt, all you have to do is recompile it to have a version that works on Windows systems. Qt also emulates the look-and-feel of Windows, so you can provide all of your users with native-looking interfaces.

In addition to user interfaces classes, Qt features portable support for file system access, working with date and time values, and network programming. With Qt, you'll find that you need to write very little, if any, platform-dependent code, because Qt already has what you need.

While programming with Qt is straightforward and feels natural once you get the hang of it, the learning curve can be steep. Qt comes with excellent reference documentation, but beginners often find the included tutorial is really not enough to get started with Qt. That is where this book steps in. Programming with Qt guides you through the steps of writing a Qt application by showing you how to write a simple paint application. It also helps deepen your understanding of the topics with exercises and fully worked-out answers.

Programming with Qt also includes:

  • A tour of all the GUI elements in Qt, along with advice about when and how to use them
  • A complete explanation of Qt's signal/slot mechanism for connecting user interaction with program functionality
  • Details on the graphics capabilities of Qt, including 2D transformations, double-buffering, and advanced image techniques
  • Material on writing your own Qt widgets
  1. Introduction
    • Why GUI Toolkits?
    • Why Portability?
    • Why Qt?
    • Implementing Cross-Platform GUI Libraries
    • Acquiring Qt
    • Compiling and Installing Qt
    • C++ as Used by Qt
    • Getting Help
  2. First Steps in Qt Programming
    • Hello, world!
    • Using the Qt Reference Documentation
    • Adding an Exit Button
    • Introduction to Signals and Slots
    • Event Handling and Simple Drawings with QPainter
  3. Learning More About Qt
    • Adding Menus
    • Adding a Scrolled View
    • Adding a Context Menu
    • File-I/O
  4. A Guided Tour Through the Simple Widgets
    • General Widget Parameters
    • Widget Styles
    • Buttons
    • Selection Widgets
    • Widgets for Bounded-Range Input
    • Scroll bars
    • Menu-Related Widgets
    • Arrangers
    • Text-Entry Fields
    • Labels Widgets for the "Office Look"
    • Progress bars
    • Scrolled Views
    • List Views
    • Widgets for Tabular Material
  5. A Guided Tour Through the Qt Dialog Boxes
    • Predefined Dialogs
    • Building Blocks for Your Own Dialogs
  6. Using Layout Managers
    • Layout Manager Basics
    • Laying Out Widgets in Rows and Columns
    • Nested Layout Managers
    • Grid Layout
  7. Some Thoughts on GUI Design
  8. Container Classes
    • Available Container Classes
    • Choosing a Container Class
    • Working with Container Classes
    • Caching Data
    • Iterators
    • Stacks and Queues
  9. Graphics
    • Animations
    • Printing
    • Managing Colors
    • Basic QPainter: Drawing Figures
    • Advanced QPainter: Two-dimensional Transformations and View Transformations
    • Double-Buffering and Other Nifty Techniques
    • Loading and Saving Custom Image Formats
    • Setting a Cursor
  10. Text Processing
    • Validating User Input
    • Working with Regular Expressions
  11. Working with Files and Directories
    • Reading a Text File
    • Traversing a Directory
    • File Information
  12. Interapplication Communication
    • Using the Clipboard
    • Drag and Drop
  13. Working with Date and Time Value
  14. Writing Your Own Widgets
    • Implementing a Coordinate Selector
    • Implementing a Browse Box
  15. Focus Handling
  16. Advanced Event Handling
    • Event Filters
    • Sending Synthetic Events
  17. Advanced Signals and Slots
    • Signals and Slots Revisited
    • Connecting Several Buttons to One Slot
  18. Debugging
  19. Portability
    • Why Portability Is Desirable
    • How to Write Portable Programs
    • Danger Ahead: When Even Qt Is Not Portable
    • Building Projects Portably with tmake
  20. Using GUI Builders
    • QtArchitect
    • QtEZ
    • EBuilder
  21. Qt Network Programming
  22. Interfacing Qt with Other Languages and Libraries
    • OpenGL Programming with Qt
    • Writing Netscape Plugins
    • Interfacing Qt with Perl
  23. Using the Visual C++ IDE for Qt Programs
    • Importing an Existing Makefile
    • Creating Your Own Project from Scratch
    • Using tmake to Create a Project Files
  24. Sample Qt Projects
    • The KDE Project
    • OrthoVista
  25. A First Look at Qt 2.0
    • Unicode Support and Improved QString
    • Improved Layout Management
    • Internationalization Support
    • Themability
    • New or Improved Widgets
    • Debugging Help
    • Preventing Namespace Pollution
    • Miscellaneous Changes
    • The Future of Qt
  26. Answers to Exercises

Reviews

Programming with Qt

Reviewed by Roland Buresund

Good ******* (7 out of 10)

Last modified: Jan. 31, 2014, 5:21 p.m.

A good introduction to QT.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required