[Qt-interest] How is the best way to learn C++ and Qt?

Ross Driedger ross at earz.ca
Tue Feb 2 00:31:24 CET 2010


On 1-Feb-10, at 5:15 PM, qt-interest-request at trolltech.com wrote:

> Message: 4
> Date: Mon, 1 Feb 2010 20:08:56 -0200
> From: Lucas Pereira Caixeta <lpcnew at gmail.com>
> Subject: [Qt-interest] How is the best way to learn C++ and Qt?
> To: qt-interest at trolltech.com
> Message-ID:
> 	<4735de921002011408k2af79bf4v2fd7377ec5a62171 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hey guys,
>
> Well, i?m working now with c++ and qt, in my past i worked with ASP  
> =/...
> So, i want (please) to know your opinion about the best way to learn  
> c++ and
> qt.

Hi Lucas,

Good question.  Sometimes we have someone showing up asking a Qt  
question and it is obvious from their code that they are still  
struggling with the C++.  If you don't have a reasonable handle on the  
language, Qt will be next to impossible.

My advice, and others may differ, is to learn C++ to a point were you  
are comfortable with designing and implementing an efficient class  
hierarchy, proper object management, have a good handle on the basics  
of multiple inheritance, including when not to use it, const  
correctness, templates and virtual functions.  As someone who has  
taught C and C++ to programmers of other languages, one hurdle that  
comes up consistently is knowing if the object you are dealing with is  
an object, pointer or reference, and the implications of each.

In my case, I would add stl, though Qt comes with some homegrown  
generic programming constructs -- but I'm an unrepentant stl-head who  
prefers to use it over Qt's constructs.  Which ever route you take,  
using collection classes is the way to go.

When it comes to the graphical stuff, you will be dealing with  
pointers for the most part.  One of the things that took me a bit to  
get used to is what heap allocated things to leave to the framework to  
delete and what I had to do myself.  Qt's system is not 'Garbage  
Collection' in the text book sense, but it does help in not having to  
write a ton of delete's.

>
> Everybody starts with c++ and qt here some day, so i?ll get goood  
> opinion

I don't know if my opinion is 'good', but it is mine. :)

Ross Driedger
ross_at_earz.ca




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100201/539ff0af/attachment.html 


More information about the Qt-interest-old mailing list