Qt and me??

Having seen a little about QT on the web my question as a newbie to C++ is should I be looking more closely at Qt, eg is it a new IDE for C++ or is it a totally different language.

This is bearing in mind that when I can get to grips with C++ it will be Windows applications that I will be looking to write. I am currently using Code::Blocks and have just about got to grips with very, very simple programming in C++ after some generous help on these forums.
QT is a set of classes (and accompanying libraries) that abstracts away the underlying API of your operating system (by which I mean, you create QT classes and use QT functions, and the QT classes and functions interact with your OS for you). The QT classes are available for a wide variety of operating systems, so the code that uses QT classes to create GUIs on one OS will (generally) work on other OSes as well.

It is not an IDE (although I understand it does now come with an IDE, which is nice but possibly not helpful for a beginner). It is not a new language. It is a set of classes and accompanying libraries that make it easy for you to create (cross-platform) GUIs, and some other helpful bits and pieces as well.
Last edited on
QT is quite flexible and you have a number of choices.
You can download the open source libraries from
http://qt.nokia.com/

Codeblocks comes with the ability to create QT projects - you need to download QT and tell/confirm to Codeblocks where the QT files are located.

There are QT plugins available from the QT website for Eclipse IDE and Microsoft Visual Studio.
(Of course you need to download QT and tell these IDE where the QT files are located although they will auto scan the default QT set directories to locate it).

QT also provide an IDE called QTCreator - this is for creating QT projects only - check the website.

EDIT 1.
Although QT framework does the same thing as Microsoft MFC apllication framework - QT is cross platform.
Last edited on
Would you tell me how to just download just the libraries; from what I see you have to download the whole thing and that would worry me in case I upset Code::Blocks by installing over it or parts of it somehow.

I am assuming that the library functions will allow me to interact with the API more easily - or is that a wrong assumption?
I'm very fond of QT!
I'm using it now for about 2 months and I'm LOVING it.
So intuitive :D
I recommend the Qt Creator 2.0 from the official website, that way you won't have to mess around with the libs etc
If I use Qt2 does it still include the C++ STL?
QT and the C++ STL are different things. Neither of them contain the other.
Moschops said
It is a set of classes and accompanying libraries that make it easy for you to create (cross-platform) GUIs, and some other helpful bits and pieces as well.


I do not agree - Qt is not only usefull to create GUI but it offers a professional modern library for dealing with c++ in an acceptable way. QtCreator is the standard Qt IDE from Nokia. Its quite good - especially all the example projects delivered together with the IDE are very usefull - especially for beginners!!

The question of OS is not relevant in most projects - it just doesn't matter if a program runs also on an other OS than the one u created it. And if u really wish to use it on another OS u can use remote techniques.
Last edited on
The question of OS is not relevant in most projects


This is so true. That's why I usually do all my coding on an old Vic20 and then just carry the output to a modern PC.

So are you saying if I chaneg to Qt from Code::Blocks I will have to forget the C++ I have struggled to learn so far and learn the Qt language?
QT is a set of C++ classes and accompanying libraries that make it easy for you to create (cross-platform) GUIs, and some other helpful bits and pieces as well.

Code::Blocks is an IDE; it is a tool that helps you write your text files and compile and link them. Whether or not you use QT classes is nothing to do with what IDE you are using; it depends on what headers you include and which libraries you link against.

QT is not a language.

Thanks Moschops - sorry to be a little slow here but on the Qt website it appears to have an IDE with it.

What concerned me was if I use that IDE do I still write as I would in C++ - to be very simplified would I still use cin and cout etc or are they specific to the C++ library?

All I am trying to do is use whichever sytem will be easiest to program Windows applications in.
Yes, they now have their own IDE. I understand it's quite snazzy.

Using QT libraries does not change C++. It is still C++. You still code in C++.

cin and cout are specific to the C++ standard libraries. Using QT doesn't take away the C++ standard libraries; it just gives you more libraries and classes and so forth. You will still be coding in C++.

Imagine that you made a cool new class called QTWindow and QTallSortsOfOtherThings, and you made it and some functions for handling it into a library, and gave it away to people to use, with a header file to include.

Now imagine that someone else did that. That is essentially what you have here.
Last edited on
Before you learn QT, you must know the basics of OOP
STL is not a must, but I'm sure you would like STL very much after you know it.
QT also have the Signal and Slot mechanism that I like so much
Qt is great for developing cross-platform GUI apps. My main beef with it is its ignorance of STL and boost
(they may have had valid reasons for doing so at the time Qt was created, but nowadays the reasoning
isn't really valid and simply serves as a boat anchor in the sense that Qt will eventually reinvent all of
STL and boost just with different names and interfaces, and that's only after its authors come to grips with
the fact that compilers nowadays are pretty good with templates).
Topic archived. No new replies allowed.