PDA

View Full Version : Why should I learn Qt?



TheIndependentAquarius
20th September 2011, 12:13
Qt is used for creating a GUI, is that all? Or there is something in Qt beyond creating a button, which makes it worth a try?

What are the important "uses" of Qt?

For what reasons you would prefer Qt over anything else?


In need of enlightenment.

stampede
20th September 2011, 12:28
Qt is used for creating a GUI, is that all? Or there is something in Qt beyond creating a button, which makes it worth a try?
Qt has built-in cross-platform support for databases, multithreading, networking, xml, unit testing, opengl, scripting, multimedia, ...
I think the answer is simple :)

For what reasons you would prefer Qt over anything else?
Qt is the most comfortable and intuitive C++ framework I've ever used.

TheIndependentAquarius
20th September 2011, 12:32
Thanks for replying.

Qt has built-in cross-platform support for databases, multithreading, networking, xml, unit testing, opengl, scripting, multimedia, ...
When you talk about built in support for multithreading and networking, how exactly is that different from writing your own "thread programs" and "socket programs".
I mean, in both the sockets and threads, you need to write all the code of creation etc. be it in normal C++, or through Qt!
Isn't it?

Am I missing some point?

nish
20th September 2011, 12:40
In C++ you have to write different code for Linux and Windows. In Qt you write the code only once.

TheIndependentAquarius
20th September 2011, 12:46
Thanks nish, that was helpful, and that's the meaning of being cross platform.

Added after 4 minutes:

So, in all now, "Portability" is one reason for using Qt, besides creating buttons. Any other reasons which any one can elaborate on?

Zlatomir
20th September 2011, 12:57
Links of this page (http://qt.nokia.com/qt-in-use) should help, but i want to ask you: Why are you asking yourself (and us)?

nish
20th September 2011, 13:04
there was a whitepaper on qt website long ago which showed how a simple GUI application with some event handling was made with far more less lines of code than using MFC/Gtk/Win32Api etc. Try to search for that.

pkj
20th September 2011, 13:31
Because your manager told you so. If you are the manager, and fear the question from devs, depends on 'what in where'. If it is intended to be desktop app, Qt is the best if it is anything which is serious enough. .net and java(I have spent enough hours on both) will both get a novice programmer up and running very fast for very basic of programs, but as the apps gets more serious, nothing can beat qt, its ease of use, its documentation. You can stay off from all the help from forums, qt assistant is all you need. No one can say that about msdn where in you wade and wade for hours, and come back to the same link after 10 mins or 10 hours depending upon your stamina and knowing nothing.
Then it is cross-platform. Being native it is fast. Some Java developers will argue against it, but being native is always good. Being in c++, you have a lots of libraries to play with of c and c++. In .net you are restricted to ones that have been wrapped. Wrapping involves a lot marshalling, and kind of things no one wants to go through. So essentially it's what m$ gives you. Java is better in that way for the sheer number of libraries they have.
However, if you are developing for the mobile platform in Qt, for whom are you developing exactly??

wysota
20th September 2011, 13:45
I mean, in both the sockets and threads, you need to write all the code of creation etc. be it in normal C++, or through Qt!
Isn't it?
Not really. If you use plain sockets, then you need to write C-based code that is quite low-level. Qt provides high-level abstractions for low-level interfaces, be it sockets, OpenGL, databases or any number of other things Qt provides.

TheIndependentAquarius
20th September 2011, 17:29
Not really. If you use plain sockets, then you need to write C-based code that is quite low-level. Qt provides high-level abstractions for low-level interfaces, be it sockets, OpenGL, databases or any number of other things Qt provides.
That was helpful hint, I'll check that out about how actually it works. Thanks.


LWhy are you asking yourself (and us)?
I have some free time, and want to spend it in gaining some knowledge.
Have heard of Qt but thought learning something without knowing its worth,
may not be helpful, so decided to trust the seniors here.

Zlatomir
20th September 2011, 19:13
You know that <probably> everyone here will say it is worth to learn Qt?

That is because Qt is helping us solve our problems, but if you ask someone that knows MFC (or WPF or wxWidgets or someOtherFramework) on an dedicated forum - you will most likely get an answer like: MFC/WPF/wxWidgets/someOtherFramework is worth it and Qt doesn't.

Anyway, you should be the only one that can answer that question, we can only enumerate some advantages Qt has over the other frameworks that we used. So think about what are you trying to achieve and you will find the answer.

wysota
20th September 2011, 20:21
I have some free time, and want to spend it in gaining some knowledge.
Have heard of Qt but thought learning something without knowing its worth,
may not be helpful, so decided to trust the seniors here.

I suggest to visit this place: http://qt.nokia.com/learning/education/course-materials

There are a bunch of lessons and exercises here about Qt. They are mostly meant for academic purposes but I guess you can learn something from it on your own as well. It should at least give you a hint on what to expect from Qt (at least parts of it). By the way, any feedback on the materials is welcome.

TheIndependentAquarius
21st September 2011, 04:53
You know that <probably> everyone here will say it is worth to learn Qt?
Well, in that case I'll tell them to read the question properly. ;) The question is W-H-Y.
and also I am hoping that the people here are not misleadingly biased towards Qt. :)

Actually I am NOT a GUI designer, nor I intend to become one. Therefore I was keen to
know whether Qt should be/can be used for some other things besides creating a blue coloured
button!


I suggest to visit this place: http://qt.nokia.com/learning/education/course-materials (http://qt.nokia.com/learning/education/course-materials)There are a bunch of lessons and exercises here about Qt. They are mostly meant for academic purposes but I guess you can learn something from it on your own as well. It should at least give you a hint on what to expect from Qt (at least parts of it). By the way, any feedback on the materials is welcome.
Many thanks for that Wysota, I'll check that out. :hattip:

Zlatomir
21st September 2011, 09:23
I see that you kind of misunderstood my previous post, so i will try to rephrase what i said.

Well, in that case I'll tell them to read the question properly. ;) The question is W-H-Y. ...
They will tell you that they already read the question, and the answer is "because Qt helps us solving our problems"

...and also I am hoping that the people here are not misleadingly biased towards Qt. :)...
I didn't say that we "misleadingly" like Qt, i only said that here we like Qt.
But i have friends that don't like Qt because they know other frameworks, for example: someone knows MFC and write code only for Windows and they consider that it doesn't worth to learn Qt.

So: only depending on what you want to code and depending on what you already know, you can find out if Qt is worth to be learned.

Anyway, if you already know C++, OOP and basic memory allocation, when you start learning Qt you will find that there isn't much to learn because the Qt framework is well designed there are some "patterns (http://doc.qt.nokia.com/4.7/qt-basic-concepts.html)" that you need to understand and after that you can start working and the documentation will help whenever you need to use a class/module you didn't used before.

/*I will tell you my reasons for Qt: //even that i think they are not going to help you that much
1) portability
2) it's design, so that you don't need to know the "whole" framework to work with it: some basic knowledge is enough and the rest can be used with the help of the documentation.
3) documentation is probably better than any other
4) the simpler high level events (signal-slot)
*/