C++ GUI Programming with Qt 3
I didn't have to force myself to read this one: the book grabbed my interest from the beginning. It's filled with just enough technical details to whet my technical curiosity, keep me turning pages, and provide the important information, clearly and concisely. I don't have much Qt development experience (none at all yet), although I am experienced in other windowing toolkits. The book quickly provided me with everything I need to know to get up and developing an application, and now I know where to quickly start.
Who's it for? I am of course a novice Qt developer, yet one with a fair amount of IT experience, specifically with other windowing toolkits. I found this book not only a great introduction for those who want to get started with Qt, but it's also a trove of information for somewhat intermediate Qt developers. It's not for people who work for Trolltech or have already been developing feature-rich KDE applications; however, besides providing a great point of entry for new Qt developers, the book does touch on some more advanced topics. Technical books tend to age quickly, but I should note that the book is written by some of the people who brought us Qt 3 and are working on bringing us Qt 4, so this book should have a degree of forward compatibility. What can I expect to learn?
The book is divided into two sections: "Basic Qt" and "Intermediate Qt" development.
The basic Qt section covers everything that someone new to Qt would probably want to learn, beginning with a simple application and an explanation of signals and slots (signals and slots work much the same way as windowing events in Java, for example, and can help to tell when a button or key is pressed). Signals and slots help make the sample application functional. This section also introduces the Qt reference documentation, available online as a reference during development, and Qt Designer, for those who want to use a graphical user interface to create components such as dialog boxes. A quick overview of some of the available widgets is next (widgets are graphical elements such as dialog boxes and buttons), which helps to give someone brand new to Qt development a feel for some of the components that come ready-to-build-upon. This is all covered in the first 38 pages of the book.
I should point out that I think that knowledge of the C++ programming language is essential if one is to learn good things from this book (I'm a big proponent of learning through experience, and you'll need to play with C++ code), but learning Qt and C++ development at the same time might help one come up with some interesting project ideas for learning!
After a quick introduction to creating custom widgets and double buffering (used in some cases to prevent screen flicker), the intermediate section starts by hopping right into layout managers, intended to make graphical forms and components beautiful (and more usable), just like tables helped to make HTML beautiful before CSS came around; layout managers help do for graphical application components what the font and alignment settings do for a word processor. The managers included are very similar to those used in Java's JFC/Swing stuff, and they work well. Also covered are methods for creating 2D and 3D graphics, drag-and-drop, and event processing. Compared to signals and slots, event processing gives the developer more control, and becomes important when writing custom widgets or changing the way an existing widget behaves.
Following this are sections on internationalization, providing online help within an application, multithreading for responsive applications, and Qt's platform-specific features. Qt works with Microsoft's ActiveX, for example, although this apparently requires the Qt/Windows Enterprise Edition as opposed to the free edition of Qt. It's important to point out that Qt implements its own threading capabilities, and the section on threads covers this in depth.
ConclusionThis is a great book for those interested in Qt and KDE development, cross-platform C++ graphical application development, and just making beautiful, functional applications. The book provides information that can't be had from the Qt API alone, and it does so in a way that kept me turning pages. Blanchette and Summerfield organized their text well, with logical chapters that make finding tips for that first application possible. This book gets twelve thumbs up from me.
Bill Lorenz is Vice-President of the Linux Users Group of Cleveland and is helping to organize the Ohio LinuxFest, 2004 edition (call for submissions now in the wild!). You can purchase C++ GUI Programming with Qt 3 from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I would love to develop stuff with QT. Free stuff, hopefully useful stuff, that's just a compile away from being cross-platform. But unfortunately, there's just a leeetle fly in the ointment, one teeny-tiny reason why I cant:
Because it would cost me over $2000 just to TEST the damn thing!!!
You see, for various reasons I'm stuck on a Win32 development platform right now. I have access to Linux boxes, and I'd love an excuse to get another Mac, but for the time being I'm doing all my grunt work on Windows. So in order to actually do anything useful, I'd have to do at least the initial development under Windows. And that's gonna cost me. Sure, I could download the 30-day evaluation, but that puts a "Buy Me Dammit!" window up on every app, and stops working after 30 days. Not exactly conducive to development flow, eh? But if I want to see what it should look like, I'm out to the tune of $1500. And if I wanted to also test it on a Mac, well, that's $2500. At least there's a $500 discount for two platforms.
Hey Trolltech, if any of you are listening, may I respectfully make a suggestion?
You mention on your site that the reason the Linux versions are free and the Win32/Mac versions aren't is that you want to foster Linux development. Well, that's a nice sentiment, but you're going about it exactly the wrong way. The best way to get people to move to Linux is to give people who already use Windows really cool FREE applications that run on Windows but that also happen to run JUST THE SAME on Linux. And do the same for the Mac. That approach eliminates the major migration barrier of "but can I run my application on Linux?" Because with QT apps the answer would be "sure, no problem".
But the only way this would happen would be if the tools to create these cross-platform goodies were accessible to the legions of individuals and small groups who write them. And right now, the price tag puts the price of developing even free Windows and Mac programs out of their reach. So you're left with the ability to create really nice free stuff for Linux that the Windows and Mac users will NEVER EVER HEAR OF. They'll never get used to those free applications, they'll never get to like those free applications, they'll never ever realize that they can have their favorite free applications WITH the benefits of Linux. And that is the biggest shame of all, because it does nothing to promote Linux.
So my suggestion to you is to please Please PLEASE open up your licensing just a little to provide free Win32 and Mac toolkits, just like you do for Linux, to create non-proprietary applications. Please understand that I have no quarrel with your current (and eminently fair) prices for development kits used for proprietary applications. But PLEASE open up your toolkit to the little guy who just wants to create something to give back to the community but is stymied by the price tag.