Foreword

Why Qt? Why do programmers like us choose Qt? Sure, there are the obvious answers: Qt’s single-source compatibility, its feature richness, its C++ performance, the availability of the source code, its documentation, the high-quality technical support, and all the other items mentioned in Trolltech’s glossy marketing materials. This is all very well, but it misses the most important point: Qt is successful because programmers like it.

How come programmers like one technology, but dislike another? Personally, I believe software engineers enjoy technology that feels right, but dislike everything that doesn’t. How else can we explain that some of the brightest programmers need help to program a video recorder, or that most engineers seem to have trouble operating the company’s phone system? I for one am perfectly capable of memorizing sequences of random numbers and commands, but if these are required to control my answering machine, I’d prefer not to have one. At Trolltech, our phone system forces us to press the ‘*’ for two seconds before we are allowed to enter the other person’s extension number. If you forget to do this and start to enter the extension immediately, you have to dial the entire number again. Why ‘*’? Why not ‘#’, or ‘1’, or ‘5’, or any of the other 20 keys on the phone? Why two seconds and not one, or three, or one and a half? Why anything at all? I find the phone so irritating that I avoid using it whenever I can. Nobody likes having to do random things, especially when those random things apparently depend on some equally random context you wish you didn’t have to know about in the first place.

Programming can be a lot like using our phone system, only worse. And this is where Qt comes to the rescue. Qt is different. For one thing, Qt makes sense. And for another, Qt is fun. Qt lets you concentrate on your tasks. When Qt’s original architects faced a problem, they didn’t just look for a good solution, or a quick solution, or the simplest solution. They looked for the right solution, and then they documented it. Granted, they made mistakes, and granted, some of their design decisions didn’t pass the test of time, but they still got a lot of things right, and what wasn’t right could and can be corrected. You can see this by the fact that a system originally designed to bridge Windows 95 and Unix/Motif now unifies modern desktop systems as diverse as Windows Vista, Mac OS X, and GNU/Linux, as well as small devices such as mobile phones.

Long before Qt became so popular and so widely used, the dedication of Qt’s developers to finding the right solutions made Qt special. That dedication is just as strong today and affects everyone who maintains and develops Qt. For us, working on Qt is a responsibility and a privilege. We are proud of helping to make your professional and open source lives easier and more enjoyable.

One of the things that makes Qt a pleasure to use is its online documentation. But the documentation’s focus is primarily on individual classes, with little said about how to build sophisticated real-world applications. This excellent book fills that gap. It shows you what Qt has to offer, how to program Qt the “Qt way”, and how to get the best from Qt. The book will teach a C++, Java, or C# programmer how to program Qt, and provides enough advanced material to satisfy experienced Qt programmers. The book is packed with good examples, advice, and explanations—and it is the text that we use to induct all new programmers who join Trolltech.

Nowadays, a vast number of commercial and free Qt applications are available for purchase or download. Some are specialized for particular vertical markets, while others are aimed at the mass-market. Seeing so many applications built with Qt fills us with pride and inspires us to make Qt even better. And with the help of this book, there will be more and higher-quality Qt applications than ever before.

Matthias EttrichBerlin, GermanyNovember 2007

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset