BN.com Gift Guide

Programming with Qt: Writing Portable GUI applications on Unix and Win32

Overview

The popular open source KDE desktop environment for Unix was built with Qt, a C++ class library for writing GUI applications that run on Unix, Linux, Windows 95/98, Windows 2000, and Windows NT platforms. Qt emulates the look and feel of Motif, but is much easier to use. 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. Qt also emulates the look and feel of Windows, so your users get native-looking interfaces.Platform ...

See more details below
Paperback (Second Edition)
$37.66
BN.com price
(Save 16%)$44.99 List Price
Other sellers (Paperback)
  • All (22) from $1.99   
  • New (8) from $25.41   
  • Used (14) from $1.99   
Programming with Qt: Writing Portable GUI applications on Unix and Win32

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$19.99
BN.com price
(Save 44%)$35.99 List Price

Overview

The popular open source KDE desktop environment for Unix was built with Qt, a C++ class library for writing GUI applications that run on Unix, Linux, Windows 95/98, Windows 2000, and Windows NT platforms. Qt emulates the look and feel of Motif, but is much easier to use. 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. Qt also emulates the look and feel of Windows, so your users get native-looking interfaces.Platform independence is not the only benefit. Qt is flexible and highly optimized. You'll find that you need to write very little, if any, platform-dependent code because Qt already has what you need. And Qt is free for open source and Linux development.Although 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 not enough to really get started with Qt. That's whereProgramming with Qt steps in. You'll learn how to program in Qt as the book guides you through the steps of writing a simple paint application. Exercises with fully worked out answers help you deepen your understanding of the topics. The book presents all of the GUI elements in Qt, along with advice about when and how to use them, so you can make full use of the toolkit. For seasoned Qt programmers, there's also lots of information on advanced 2D transformations, drag-and-drop, writing custom image file filters, networking with the new Qt Network Extension, XML processing, Unicode handling, and more.Programming with Qt helps you get the most out of this powerful, easy-to-use, cross-platform toolkit. It's been completely updated for Qt Version 3.0 and includes entirely new information on rich text, Unicode/double byte characters, internationalization, and network programming.

Read More Show Less

Editorial Reviews

Lou Grinzo

Linux's meteoric rise in both popularity and usage is increasing the demand for solid information for programmers about all aspects of Linux development, as well as cross-platform issues. Programming with Qt, by Matthias Dalheimer, covers a tool that addresses some of the thornier topics in modern GUI programming, cross-platform application frameworks, and widget toolkits. Qt is a product of Troll Tech, and is available for both X Windows and Win32 environments. Dalheimer is a member of the board of directors of the KDE Foundation, and has considerable Qt experience, since the KDE desktop environment for Linux is based on Qt.

In the book's 25 chapters, Dalheimer provides a good overview of the Qt programming model, and presents a solid conceptual framework for any experienced programmer new to Qt. He includes several usage tips and many pieces of thoughtful advice, any one of which could easily be worth the cost of the book in the right circumstances. He also talks about some more advanced topics, such as how to deal with resizable dialogs, especially at a time when large monitors are nearly ubiquitous; portability issues; and even the pros and cons of various approaches to writing a cross-platform widget toolkit like Qt. For readers new to Qt, especially those with a Windows background, this is all useful and enlightening material.

Dalheimer takes you through the expected steps, from the obligatory "Hello, world!" program to dealing with menus, event handling, Qt's layout managers and container classes, graphics and text programming, file handling, focus issues, and interapplication communication. One of the longer chapters covers writing your own Qt widgets, and includes two extended examples that will be useful references for anyone taking on this task. Chapter 9 is one of the strongest parts of the book, in that it covers numerous graphics programming topics, such as palette management, saving and displaying graphics, double buffering, and transformations.

One area the author focuses on throughout the book, and to good effect, is Qt's use of signals and slots. (These are not traditional UNIX IPC signals, but a variation unique to Qt.) This is the technology that notifies specific parts of a program when UI events happen, such as users clicking on a button or an item in a listbox. Every application framework has its own way of performing this "plumbing," and understanding it well enough to get notifications in the right places, forward them effectively, and so on, is critical to using the framework. Dalheimer clearly appreciates this fact, and doesn't just talk about Qt's signals and slots once and then move on, but returns to the topic several times in different contexts.

Experienced programmers might raise an eyebrow over the thought of covering all this material -- an entire application framework and a widget toolkit -- in a mere 361 pages. (Petzold's Programming Windows, easily the standard in this area, is well over twice the page count in its second edition, for example, even if it does cover some topics not in Qt.) This highlights the only serious problem with this book: Its treatment of some topics is conspicuously thin. For example, the discussion of the file open/save dialogs is barely half a page of text (not counting illustrations), yet you will likely spend considerable time with these dialogs in various programs, using them in different ways. This book isn't meant to be a replacement for Troll Tech's reference manual, obviously, but several examples of how to use these dialogs with various options (multiple selection, file must exist, and the like), as well as a discussion of cross-platform issues would have been very welcome. Similarly, there are places where Dalheimer leaves pertinent questions unanswered, such as what the limit is on the number of items that a Qt listbox will handle. (He does advise against putting too many items into a listbox, for human factors reasons, which is clearly good advice, but it's critical for programmers to know what such limits are if they're to avoid exceeding them.)

I was bothered by the number of extremely short chapters. Chapter 13, "Working with Date and Time Values" is less than one page of text, Chapter 18, "Debugging" is not quite two full pages, and "Sample Qt Projects" mentions only two -- KDE and Ortho Vista -- and doesn't provide nearly the insight into real-world usage of Qt for commercial work that I'd hoped for. More serious yet is the book's almost complete avoidance of font and text output issues, something nearly all programmers will have to wrestle with.

These problems certainly don't make this a bad book, but they do make me wish for at least a few hundred more pages of the kind of work that Dalheimer is clearly capable of, to provide the fuller treatment programmers need of Qt at this time. Still, Programming with Qt, combined with the Qt reference material (freely available from the Troll Tech web site), should be enough to get experienced programmers started, while we hold out hope for a more comprehensive second edition.
Electronic Review of Books

Read More Show Less

Product Details

  • ISBN-13: 9780596000646
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 1/29/2002
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 522
  • Sales rank: 732,292
  • Product dimensions: 9.10 (w) x 7.00 (h) x 1.10 (d)

Meet the Author

Matthias Kalle Dalheimer is the President & CEO of Klaralvdalens Datakonsult AB, a Sweden-based consultancy specializing in platform-independent software solutions. He is also a founding member of the KDE project and the current president of the KDE foundation. Kalle has written numerous books for O'Reilly, both in English and in his native German, including "Running Linux" and "Programming with Qt". In his spare time, he enjoys cross-country skiing and reading history books. Kalle lives with his wife Tanja and his two sons Jan and Tim in the middle of the forest near Hagfors in the Swedish province of Varmland.

Read More Show Less

Table of Contents

Preface

Chapter 1: Introduction

Chapter 2: First Steps in Qt Programming

Chapter 3: Learning More About Qt

Chapter 4: A Guided Tour Through the Simple Widgets

Chapter 5: A Guided Tour Through the Qt Dialog Boxes

Chapter 6: Using Layout Managers

Chapter 7: Some Thoughts on GUI Design

Chapter 8: Container Classes

Chapter 9: Graphics

Chapter 10: Text Processing

Chapter 11: Working with Files and Directories

Chapter 12: Interapplication Communication

Chapter 13: Interfacing with the Operating System

Chapter 14: Writing Your Own Widgets

Chapter 15: Focus Handling

Chapter 16: Advanced Event Handling

Chapter 17: Advanced Signals and Slots

Chapter 18: Providing Help

Chapter 19: Accessing Databases

Chapter 20: Multithreading

Chapter 21: Debugging

Chapter 22: Portability

Chapter 23: Qt Network Programming

Chapter 24: Interfacing Qt with Other Languages andLibraries

Chapter 25: Using the Visual C++ IDE for Qt Programs

Chapter 26: Visual Design with Qt Designer

Answers to Exercises

Colophon

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)