Review:Programming with Qt 41
Programming with Qt | |
author | Matthias Kalle Dalheimer |
pages | 361 |
publisher | O'Reilly |
rating | 9/10 |
reviewer | ErikSev |
ISBN | |
summary | An excellent book on QT programming, and a must buy. |
The Parrot Book, as this is sure to be known, is excellent for a beginner looking to quickly learn the ins and outs of Qt programming. Some previous experience with GUI programming helps, and previous C++ experience is required.
The Layout:
Programming with Qt starts with a chapter on Qt. It addresses freedom issues, portability issues, and other miscellaneous stuff. You then go through a basic program. The next few chapters introduce lots of different widgets and layout managers. Next come all sorts of other things like focus handling, graphics, working with perl, GUI builders, 2d transformations, etc. Look at the table of contents, it pretty much tells you what's included.
The Good:
Most of it. I personally bought this book having no previous experience with Qt, but familiar with GTK, MFC, etc. Within a day or two I was writing usable programs in Qt. This book is direct and to the point. Moreover, this is NOT just Linux users, Windows coders are definately covered, and portability is addressed extensively. GUI design, plus advanced tips and tricks are addressed. As the table of contents shows, all sorts of topics, both beginner and advanced, are covered.
The Bad:
A little too brief.just in spots. The cover of the book touts, "Covers Qt 1.4x and 2.0". I honestly feel that that is almost false advertising. Qt 2.0 is covered in a sparce 4 pages, with only two lines of code. One other nitpick, alot of lines of code are repeated, when he could just show the new/changed portions of the program. Final Thoughts:
While this book isn't a reference manual, it gets you started, and to the point where you can quickly write programs, use the more advanced features, and have the skills to find what you need in the system documentation. I do wish 2.0 were covered more, and that another unique program or two were written instead of so much code repetition. If your interested in learning Qt, and like dead trees to look at, this is a great buy. Everything you expect from a book with an animal on the cover and O'Reilly on the spine.
Pick this book up at Amazon.
Preface
1: Introduction
2: First Steps in Qt Programming
3: Learning More About Qt
4: A Guided Tour Through the Simple Widgets
5: A Guided Tour Through the Qt Dialogs
6: Using Layout Managers
7: Some Thoughts on GUI Design
8: Container Classes
9: Graphics
10: Text Processing
11: Working with Files and Directories
12: Inter-Application Communication
13: Working with Date and Time Values
14: Writing Your Own Widgets
15: Focus Handling
16: Advanced Event Handling
17: Advanced Signals and Slots
18: Debugging
19: Portability
20: Using GUI Builders
21: Qt Network Programming
22: Interfacing Qt with Other Languages and Libraries
23: Using the Visual C++ IDE for Qt Programs
24: Sample Qt Projects
25: A First Look at Qt 2.0
Slightly disagreeing (Score:1)
Testing (Score:1)
Re:QT? (Score:1)
The Troll Tech C++ based QT GUI toolkit, available for Linux, Win32, and used as the backbone of KDE. Check the home page at
http://www.troll.no/
Ciao.
alternative interpretation (Score:1)
: four symbols in your DNA.
: There is no I.
When I first looked at this comment, I noticed that GCAT are not themselves part of your DNA, but merely represent the molecules that do constitute your DNA. Thats when the other meaning of the second sentence hit me. (Insert Hofstadter (The Mind's Eye/GEB) and Dawkins (The Selfish Gene) blather here)
--
Man is most nearly himself when he achieves the seriousness of a child at play.
Re:qt, what is there for Gnome? (Score:1)
www.gnome.org [gnome.org]
www.gtk.org [gtk.org]
Re:GTK-- is no good (Score:1)
Guillame pointed out problems with language wrappers in general. Mainly maintenance problems. He said nothing about how good or bad Gtk-- is. In fact Ken Nelson often refers to libsig++, the signal framework of Gtk--, as the most advanced out there (no need for moc like hacks if I understood it correctly).
Re:I agree (Score:1)
IMHO that's precisely what a good book should do; give you enough of a grounding to understand and use the documentation and source code. Don't bury me in hundreds of pages of code; don't duplicate the on-line documentation; do cover the basic design ideas underlying the topic.
Re:GTK-- is no good (Score:1)
Re: Parrot book... (Score:1)
Try wxWindows for GTK (Score:1)
Just started it... how accurate is it (Score:1)
But anyway, I was wondering about errors, eg page 27, line 22 of the code
QLCDNumber * mylcdnum = new QWidget(1,mywidget);
surely this should be "new QLCDNumber(...)" (see the rest of the code). Is this an isolated instance, or does it continue ?
As for the "diehard MFC programmers, do they exist" comment of one of the replies, yes, unfortunately they do exist, legions of them. I wrote my first C++ Windows wrapper layer in 1990, before MS released a C++ compiler, and I've refused to use that brain-dead excuse for a class library since. But unfortunately all those superb VB programmers out in the world want to progress, and MFC lets them write VB-quality code in C++ (The horror, the horror...).
Re:QT? (Score:1)
QT [troll.no] is a "GUI Toolkit" produced by a company called Troll Tech [troll.no]. A GUI Toolkit is a library that contains a framework for developing graphical applications. This prevents programmers from having to reinvent the wheel, so to speak, whenever a programmer needs to create a scrollbar in his/her application. QT is written in C++ and has the benefits that it's free for Open SourceTM use, has the source available, and is fairly handsome.
QT is the foundation upon which The K Desktop Environment [kde.org] and QT NetHack [troll.no] (of arguably greater importance) are built.
The following sentence is true.
The previous sentence is false.
Oops (Score:1)
Re:qt, what is there for Gnome? (Score:1)
Erik
Re:qt, what is there for Gnome? (Score:1)
Easy to hack (Score:1)
I also did the same with kmines, changing minesweeper so that it does a few more fun things.
I did this with no training in C++ (I know only C), and certainly no knowledge of Qt.
Re:qt, what is there for Gnome? (Score:1)
OOP (Score:1)
qt, what is there for Gnome? (Score:1)
Benjamin
Ack! (Score:1)
Other than that, maybe I'll go buy it. I've been tossing around the idea, and with this B&N coupon I've been saving for a rainy day...
Great book (Score:1)
I've found Qt programming to be a joy. I've been porting over an MFC program of mine to Qt, and I still marvel at the stupid stuff you have to do with MFC.
Re:OOP? Do you REALLY know C++? (Score:1)
I suspect that if you had problems with C++ it was because:
A) You only half learned it and were using C++ syntax in old C-style programming (procedural not OO).
or
B) You never learned proper OO techniques. I suggest a college level course or the Book "Design Patterns" by Gamma et al.
As for your assertion that it is an immature language, well it's been around for 15+ years and is ANSI standardized...which is more than I can say for Scheme and Java (don't get me wrong, I like Java).
BTW if you can program Java, you can program C++
Maybe you should try to do the same.
I'll Just Wait for the O'Reilly Quick-Reference (Score:1)
I'm actually waiting for this title to arrive at Amazon (this and the book on MySQL).
Qt is the coder's equilevelent [sp?] to the WINE Project -- open GUI code betwween platforms.
What a wonderful segue into Linux/UNIX for those diehard MFC programmers (and I'm STILL not convinced they actually exist) !!
Qt not QT (Score:1)
It's made by Troll Tech [troll.no]
I agree (Score:1)
You don't really need any experience with GUI programming, though. I haven't much, and I picked things up straight away.
Re:how about a full-fledged GTK++? (Score:1)
ugh, I hope I didn't just volunteer myself
Good book, bad timing re Qt 2.0 release (Score:1)
---------------------------------------
Re:OOP (Score:1)
C++ is a nasty hack. I learnt it, I used it, I got tired of it, and I'm still writing C, Scheme and Java. The limitations of C++ are demonstrated by the inclusion of "moc" in Qt. Since when did I need language extensions to program a GUI? The only other toolkit I'm familiar with that does this is... MFC, which is also based on C++
Maybe I jump to conclusions too easily, but I think C++ is a poor choice of language for an ostensibly platform-independent GUI. The language is still very immature, and doesn't even show OO techniques very well.
If you're determined that OO design is "it" then check out GTK+ _and_ Qt before you decide on one or the other based solely on the rhetoric of this book or the Trolls. If you're determined to use C++, check out GTK-- too.
Disclaimer: I've used GTK+ since 1997