0

Simple question,

Is something like QT a good way to get started in C++ programming?

Actually is QT even C++, I probably should ask that too.

I would want to work with PC stuff, nothing mobile.

Update

Oh yeah!

I just wrote Hello World. Only about 20 years of learning left.

AtomicPorkchop
  • 2,625
  • 5
  • 36
  • 55

5 Answers5

1

QT is a cross-platform application and UI framework, It is written in C++,

C++ is not QT!

If you want to learn C++ pick up a good book, I suggest Thinking in C++ for a start.

See here for definitive book list.

Community
  • 1
  • 1
Alok Save
  • 202,538
  • 53
  • 430
  • 533
1

Yes, Qt is written in C++ (but there are bindings available for a lot of other languages).

Whether or not it is "good to get started with C++" is completely subjective. It is good in the sense that it makes writing GUI applications really easy, and has excellent documentation, tutorials and samples IMO.

It's not so good in the sense that you'll be learning "C++ with Qt". In particular, using the standard C++ containers and std::string does not mix so well with Qt code where you're expected to use the Qt classes for this.

Mat
  • 202,337
  • 40
  • 393
  • 406
  • Depends on what you want to do, what your prior knowledge of other languages (C? Java? other) is, what you're expecting to learn, whether you want to write GUI code or not, ... There is no objective answer to your question (except for "Qt is written in C++" part). – Mat Jul 24 '11 at 06:25
  • That is the thing, the best I have under my belt is about 8 month of Perl. So I am still flexible when it comes to picking up something. I grabbed a program called Dev-C++ from sourceforge. That should be good for someone like me right? – AtomicPorkchop Jul 24 '11 at 06:44
  • How can I know, I'm not you :-) If it works for you, great. If it doesn't, pick something else. – Mat Jul 24 '11 at 06:45
  • Good point, Thanks for the help. What I more meant to ask was whether Dev-C++ is good for beginners, but I answered my own question. – AtomicPorkchop Jul 24 '11 at 07:26
1

If you're beginning C++ programming you need to distinct between the language and the libraries (predefined functions) that you use with your language.

If you want to develop windows based applications you need to use some UI toolkit. QT is one, MFC another one and so on... They provide a layer of abstraction between the language and the OS.

But I'll suggest you to first get in touch with the language. Before mixing with libraries and other stuff. Build console based applications while you get proficient at least with the syntax (and pointers).

Erre Efe
  • 15,387
  • 10
  • 45
  • 77
  • I agree, it sound like a I would get no where fast by jumping off the deep end with out knowing how to swim. – AtomicPorkchop Jul 24 '11 at 06:44
  • Sure, C++ is pure power but kinda weird to start with. If you let me suggest something I use to recommend this free video training to my students: http://deimos3.apple.com/WebObjects/Core.woa/Browse/unsw.edu.au.1504975442 Its simple, realistic and very interesting. – Erre Efe Jul 24 '11 at 06:48
0

Yes, QT is in C++. Better to say you should know C++ in order to use QT, just like you should know C++ in order to code in Symbian

RajSanpui
  • 11,556
  • 32
  • 79
  • 146
0

My suggestion is to start by learning "pure" C++ with the help of a good book (I can recommend Accelerated C++ by Koenig and Moo, I think it is ideal for you, because it gets to the point fast, it is correct and it uses a modern idiom).

If you do take the often suggested "Thinking in C++" book, remember that it is quite dated, and the author is more keen on Java/C# than C++, which sometimes shows. The code examples often use dated idioms, and are sometimes inelegant, and (rarely) even wrong. All that said, it is still a good book, fun to read, and the author is a good teacher. Just remember to double check the examples and take them with a grain of salt.

Afterwards start with learning Qt if you want to do GUIs, I think it is a great UI framework. Qt uses a preprocessing step called MOC compiler, which makes it kind of a language extension, which solves some practical problems, but is considered to be kind of a Hack. At least (IMVHO) Qt is much better than most native Platform frameworks (MFC, Cocoa), and you're code is portable to most major platforms.

Community
  • 1
  • 1
Fabio Fracassi
  • 3,791
  • 1
  • 18
  • 17