Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt for Delphi developers

Tags:

c++

qt

delphi

Does someone know of a book or tutorial explaining Qt for Delphi / C++ Builder / VCL developers?

What would be the best approach for a developer with that background to learn Qt? I'm particulary interested in how to accomplish things that I know how to do in Delphi with Qt.

For example, what is the Qt equivalent to Delphi Frames? What about Forms/Frames inheritance? Should I use Qt Designer, Qt Creator or hand code for such tasks?

Another thing is Qt Widgets and objects life cycle. Does Qt take care of widgets and objects destruction or shoul the programmer do it manually? Or may be Qt does that for some types of objects but not for other types?

As a side note I do know C++, so the language itself is not an issue. I'm concerned with the library.

like image 876
user16120 Avatar asked Mar 06 '09 15:03

user16120


3 Answers

One way might be to study the source for the FreeCLX open source project. It contains an implementation of the VCL using Qt. So if you are curious which Qt widget maps to a VCL type, that should get you on your way. Note, however, that Qt 2.x.x used multiple inheritance (no longer true in current Qt), so the FreeCLX interfaces to Qt via a special library to flatten this out.

like image 187
Craig Stuntz Avatar answered Oct 24 '22 14:10

Craig Stuntz


To further what Javier says - concepts from one windowing toolkit to another map even less well than languages. It's especially confusing since there are only so many words (frame,window,widget etc) that get reused.

I would go through the (excellent) examples and tutorials included in the QT distribution (you might have to download the source dist) and then think - how would I have done that in VCL?

like image 34
Martin Beckett Avatar answered Oct 24 '22 15:10

Martin Beckett


the easiest and fastest way to learn something new is to put all the old things aside. don't try to think in Delphi when developing in C++.

first learn some C++ (it's not hard, really) then pick Qt. you don't have to know ALL of C++ and STL to get to speed with Qt, just get comfortable with the syntax and fundamental concepts (like pointers, structs vs. classes, these kind of things).

like image 30
Javier Avatar answered Oct 24 '22 13:10

Javier