Product Description
The Only Official, Best-Practice Guide to Qt 4.3 ProgrammingUsing Trolltech’s Qt you can build industrial-strength C++ applications that run natively on Windows, Linux/Unix, Mac OS X, and embedded Linux without source code changes. Now, two Trolltech insiders have written a start-to-finish guide to getting outstanding results with the latest version of Qt: Qt 4.3. Packed with realistic examples and in-depth advice, this is the book Trolltech uses to teach Qt to its … More >>

C++ GUI Programming with Qt 4

5 thoughts on “C++ GUI Programming with Qt 4”

  1. This book contains the most thorough coverage of the many functionalities in Qt. The second edition is also the most current of all the books (a fleeting feature, but noteworthy depending on what you want to learn). Its well written and after over 1 year of working with the book I have yet to find any erroneous information of code.

    We own all of the Qt books, but we use this one for teaching Qt in our Internship program. The Basic Qt Section starts simple and builds up from individual widgets and signals/slots to dialogs to windows to the full fancy application functionality (menus, toolbars, docking objects, tabs, MDI windows) that Qt makes pretty effortless in a number of ways.

    The book covers the very powerful Model-View structure very well. We have also benefitted from the XML, layout and networking chapters. The book has also been of help in dealing with look and feel issues (stylesheets and subclassing QStyle). It also covers a number of fascinating topics that I’ve read about but just never used professionally, such as plug-ins.

    Some criticized its style of covering the development and structure of a small (spreadsheet-type) application. This is actually the most beneficial way to learn how to use the library since you wind up with the ability to see how the pieces interact with each other. Its easy to show how a QAction works; showing how to make it flow through an MDI to the right window, however, is much easier in a whole application context. This book is not a book on computer science (algorithms, etc); its certainly a book on the specifics of how to work with the Qt library and its also a book on application development generally. The downloadable code from InformIT is a nice bonus.

    The Qt library, like any actively developed library, is constantly evolving so it should be no surprise that there are some features added since publication. I think its more a positive about Qt than a negative about the book. Each chapter is well organized, with each chapter covering one of the many aspects of Qt programming. Its impossible to cover every class and method because the Qt library is huge. This book clocks in at over 700 pages and, in my opinion, more than hits the highlights. I have no problem hitting the web or documentation for more in depth info. But with this book, I feel like I’ve got enough background to tackle the issues.

    Lastly, in response to those who criticize Qt: I have tried a number of the other major libraries and I have found nothing better for GUI than Qt. But Qt covers so much more. It provides data types and containers (eg QString, QList, QHash), model-view-controller GUI, networking, regular expressions, signals-slots. I’ve moved my apps from using a mix of MFC, boost, and other libraries to just using Qt. Qt is highly consistent and all data can be moved from one class to the next with minimal effort. It truly is the best available and this is easily our book of choice for training with the Qt library.
    Rating: 5 / 5

  2. In my opinion, the authors of this book used an inappropriate technique for explaining Qt concepts: they repeatedly show long excerpts of source code (C++ with Qt classes and macros) and then go through the source code line by line explaining what we are seeing. It’s like exploring an art museum with a magnifying glass held 2 inches away from the paintings. You never get the big picture, you can never stand back and see Qt from the top down, you can never get your arms around it. Just these endless examples with fantastically detailed explanations in which absolutely critical concepts are buried deep in the text, casually mentioned in passing, and given no more space or emphasis than the unimportant concepts.

    This technique didn’t work at all for me. I got through the first 50 pages or so and was exhausted because I had to spend so much time combing through the code examples and the text, reading and re-reading and studying it. And rather than use simple examples that would spotlight and highlight new key concepts, the authors veer off into fairly advanced things way too early (like shape-changing dialogs on page 31 and dynamic dialogs on page 38) while the reader is still trying to digest the basic concepts like QObject and slots and signals.

    Unfortunately, the two other Qt books out there and the Trolltech tutorial aren’t much better. They all have this nutty idea that you can teach Qt to anyone if you just hang source code like wallpaper everywhere and then explain it line by line. The authors of this book obviously spent a lot of time on this book, and I don’t enjoy criticizing their work, but the book would have been ten times better if the authors had prefaced each chapter with an introductory discussion of key concepts and not forced the readers themselves to dig the details out of dense source code.

    So I got to page 51 and gave up… then the book turned into a doorstop, sadly. It might be useful to a Qt expert who is trying to refresh his or her knowledge of Qt, but as a tutorial to new students of Qt the book is unsuccessful.
    Rating: 1 / 5

  3. This book is fantastic, probably the best programming book I have ever read. I didn’t even know c/c++ when I started reading (Java developer), but lo! and behold, there is an appendix for Java/c# developers to teach them how to use c++. I have read the book cover to cover and had absolutely no problems understanding any of the concepts in the book. I didn’t need to reread anything. I am not sure what some of the other reviewers are talking about; maybe it is because I am familiar with Swing and .Net gui development and the concepts are basically the same. The parts in particular about slots and signals mentioned below I felt was done extremely well. I don’t know how other programmers learn, but I learn by seeing some code in action then piecing together what it does line by line. If that isn’t how you learn, I would get a different book.

    This book is organized like this,

    brief intro to a topic

    code example of topic

    line/group of lines by line explanation of code. Here they explain both the big and little pictures, “signals are used for … and here is how you connect them in the code… here are some reasons to use signals… etc”

    brief outro of a topic

    I really can’t say how perfect this book is, it is perfect. I went from not knowing c++ to writing professional looking apps in a weekend. I am not saying that will be the case for everyone (obviously look at the other guy’s review, sounds like he couldn’t figure out how to compile his code…). Keep in mind, as I’ve mentioned I have been programming for years in Swing and .Net, so I would definitely say I had a head start for understanding the concepts which Qt was built on.

    P.S. Qt is pronounced “cute”.
    Rating: 5 / 5

  4. If I could sum this book up with one phrase, it would be “information gaps”. They are everywhere in this book.

    If you have ever had a fragmented conversation with a young child, and you are trying to put it all together as you listen, but their thoughts are just all over the place – then that is kind of like how this book is written.

    It’s a real pity that there’s such a paucity of books on the QT libraries. I recommend jumping straight into the QT documentation. This book adds no value.
    Rating: 1 / 5

  5. This book was my first introduction to Qt, and I’ve been using it for about two weeks now on a project. Other reviewers have argued that it doesn’t give enough of a big-picture view. It is true that the book has many pages of annotated source code. I started off thinking the verbosity was daunting, but when I actually tried to start using Qt, I quickly appreciated all the little details in this book and the very complete index (the index is over 50 pages long). The Trolltech website is a good reference for putting everything in one place, but this book is great for stepping through an example in detail.

    One caveat: I’ve used other widget sets (Gtk, Tk) before with other languages, but have no previous experience with Qt, and not much experience with C++ (so I found the “Intro to C++” chapter for Qt programmers a helpful summary).
    Rating: 5 / 5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.