tags:

views:

707

answers:

8

I used to program in Qt3 a long time ago and I had read a great book that I still have by O'reilly on Qt3. I wanted to start using Qt4 again now several years later.

Can I use my Qt3 book to get up to speed again, or has things changed so much that I should buy a Qt4 book?

+2  A: 

Qt3 support classes still exist in Qt4 but Qt has developed itself very much. I think using your Qt3 book will slow you down. It is best if you buy a new book.

If you don't want to spend money on a book, examples, tutorials & documentations are very helpful.

erelender
+5  A: 

You should consult the Qt books page at Nokia.

Two books from that page are available freely:

Cristian Adam
I am not very happy with "Introduction to Design Patterns in C++ with Qt4", it tries too much to mix things (c++, qt4, design pattersn). Once should learn c++, then design patterns, then Qt, then how to integrate the design patterns with Qt.
elcuco
+2  A: 

You can find a 3 to 4 guidelines document with all the differences on Nokia's site.

I would recommend a Qt 4 book to a Qt 3 one, but since you have already worked with Qt, I think that you can just use the docs and be ok.

rpg
Actually, once you're familiar with the architecture, you can just use the autocomplete feature of your IDE 90% of the time.
Jurily
+1  A: 

If you know Qt, this http://qt.nokia.com/doc/4.5/classes.html should be okay to get adapted.

For redirection to documentation for the latest version of Qt use one of the following links: http://doc.trolltech.com/latest/ or http://qt.nokia.com/doc/latest/

felix
I agree. The free online reference material is more than sufficient to make the transition. The signals/slots, layout and other related instruction from the Qt3 book still apply for the most part.
Judge Maygarden
A: 

I say you use the designer for a while and look at the generated code. I used it to learn how to work with Qt4.

Geo
+1  A: 

Qt4 is much more powerful than Qt3 ever was (especially now, as Qt 4.6 draws near, even though Qt 4.0 had some shortcomings). Your knowledge of Qt3 will let you do basic stuff with Qt4 as the style hasn't changed much for basic functionality, but to truly use all the power of Qt4, you will need to learn things that are Qt4 specific.

Fred
"you will need to learn things that are Qt4 specific" - Such as?
Bill
As per my answer -- it's not crucial, but you almost certainly want to at least learn about these (the first being the hardest): model/view architecture, template container classes, new (modular) build system, new action-based main window implementation, widget styling with CSS.
Sam Dutton
+2  A: 

Most of the things remain quite similar. There was some cleanup, but the basics (signal-slot mechanism for example) remain the same. You still have all those QStrings, QActions, QDialogs etc. Your Qt3 knowledge should remain valuable.

On the other hand there are many new elements. There's a big QGraphicsView framework, Phonon framework for multimedia files, QtWebKit HTML engine, QtConcurrent engine for multithreading etc. You might want to learn all the new goodies.

Trolltech (what's the current name?) always has good documentation, so check What's new in Qt4 and you should be fine with API reference for the latest Qt4 version.

Tadeusz A. Kadłubowski
Nokia is the new name, since Nokia acquired Trolltech.
erelender
+4  A: 

In a nutshell:

  • Qt 4 is (even) better -- and more powerful and flexible -- than Qt 3
  • you'll be fine!

The Porting to Qt 4 documentation gives some idea of the many small changes to APIs.

What's New in Qt 4 gives an overview of the big differences between Qt 3 and Qt 4.

Some major changes that noone has mentioned so far:

  • Model/View architecture
  • template container classes
  • a new, modular build system
  • a new action-based main window implementation
  • widget styling with CSS
  • ports for S60 and other platforms

There are also lots of small fixes, improvements and useful new classes such as QFormLayout and QSignalSpy.

Sam Dutton