PDA

View Full Version : Best way to learn Qt



vermarajeev
5th March 2007, 04:38
Hi guys,

I have got an opportunity to give training on Qt. Lets discuss on agenda's, topics to be covered and some qt assignments (with resources) which can help me and others(who wants to give training) to produce the best results. This will even help me to make my basics strong.

Please see that the assignments given is in order...First basics, then intermediate then complex.

Thanks guys

wysota
5th March 2007, 15:00
Learn or teach?

vermarajeev
6th March 2007, 04:06
Learn or teach?

Both:) When I teach others I too is learning something. Basically the training is for industry level where you teach freshers about Qt who are newbie(Who have never used Qt before).

Thanks

wysota
6th March 2007, 11:26
It depends on the audience then. If they have experience with other toolkits (like MFC), it might be good to compare the two and to show differences. That might give you a good starting point.

vermarajeev
6th March 2007, 12:03
It depends on the audience then. If they have experience with other toolkits (like MFC), it might be good to compare the two and to show differences. That might give you a good starting point.

Yes, the audience can be experienced( like MFC ) and fresh engineers ( newly passed out from colleges and finished there training on basics).
That is true I can compare Qt and other toolkits and have a good impact. I thought to go like this.

The training in basically on qt4 and is for a duration of 10-15 days or max 20.
1) Introduction to Qt
2) Advantages of using Qt over other toolkits
3) Disadvantages of using Qt over other toolkits
4) Compare Qt with other toolkits
5) Transition from Qt1.x.x to Qt4.x.x
6) 'Hello world' Example using Qt
7) Talk on QtDesigner
8) How to use QtDesigner
9) Differences between using QtDesigner and Hand Coding
10) Discussion on qmake and project files
11) Widgets with sample examples
12) Other widgets //pick some common widgets from QtAssistance and discuss

NOTE: After each session one assignment should be given on topics discussed. If the session is for 2 hours, the above topics should be distributed accordingly

These are some of the things in my mind right now.

Waiting!!!! for improvements.....

wysota
6th March 2007, 12:10
My hints:
- forget about Qt1-Qt3, go for Qt4 right away, engineers don't care about obsolete technology
- merge items 2, 3 and 4 into one
- ad. 9 - could you explain? What differences? There are no differences, you do exactly the same thing, only once automated and the other time not
- make them write as much code as possible themselves
- be sure you are well prepared, especially for answering unexpected questions

jpn
6th March 2007, 12:50
Qt is a large subject to talk about. Anyway, here are some topics (in arbitrary order) one could speak about:

a widget tour
object model
signals and slots
events (and filters)
assistant, designer, linguist
qmake, moc, uic, rcc
model/view
graphics view
internalization
resources
containers
painting
styles (and style sheets)
networking
multithreading
xml
sql
plugins
the rest I forgot

The list is almost endless. The choice is yours. Just don't forget to emphasize the usage of Qt Assistant through the training course. ;)

vermarajeev
6th March 2007, 14:37
I agree with wysota's suggestions about giving more assignments. But what assignments????

I have one idea. Here it goes.

Break a project into smaller modules (just like assignments), depending on the session give one assignment(based on project decided). Continue this process till entire project gets completed. Finally integrate...

Is this a good idea?????

If yes-->
We'll discuss on project and how it can be broken into assignment.

If No-->
Some more ideas....

Thanks

wysota
6th March 2007, 15:10
But what assignments????
A classic idea is to divide the attendants into two groups and tell one group to implement a simple application using MFC and the other to implement the same application using Qt. Based on the fact that they already know MFC, it should take the MFC group less time to complete the task. But you'll notice this is not the case - it will take approximately the same amount of time for both groups and it won't matter that one of the group has to learn to handle Qt and the other already knows how to deal with MFC. Just make sure you choose the application correctly and that you tell them how to use Assistant before they start :)


Break a project into smaller modules (just like assignments), depending on the session give one assignment(based on project decided). Continue this process till entire project gets completed. Finally integrate...

Is this a good idea?????
I don't think so. You'll have marauders that will be slowing you down - such an application requires to complete one task before starting the next. It's better to have them implement a bunch of small (one session) apps instead.

vermarajeev
6th March 2007, 15:52
A classic idea is to divide the attendants into two groups and tell one group to implement a simple application using MFC and the other to implement the same application using Qt. Based on the fact that they already know MFC, it should take the MFC group less time to complete the task. But you'll notice this is not the case - it will take approximately the same amount of time for both groups and it won't matter that one of the group has to learn to handle Qt and the other already knows how to deal with MFC. Just make sure you choose the application correctly and that you tell them how to use Assistant before they start :).

As I already told the attendants can be either experienced in other toolkits or just newbie(recently passed out). I dont know how many knows MFC. What if 1 knows MFC and remaining are just newbie????:eek:

The idea is really classic one. The idea works for people who knows MFCs in one half and other half without it. I think it should be a portable idea. It should execute on both platforms(experienced in other toolkits or just newbie).

What do you say wysota?????

wysota
6th March 2007, 22:11
What if 1 knows MFC and remaining are just newbie????

Then there is no reason to teach them Qt if they don't know any other toolkit and want to switch environments (switch from what?).

vermarajeev
7th March 2007, 04:44
Then there is no reason to teach them Qt if they don't know any other toolkit and want to switch environments (switch from what?).

No!!!. There is a reason. Here it is...

Ok I agree attendants have to have some knowledge on some toolkit but there can be cases where the attendants are just fresh passed out. They might have done some small project during their colleges. So there is possibility that they have some domain knowledge (might not be MFC). It can be either Visual Basics, Networking, C, C++, Computer Graphics, Java etc.

When I learned Qt I only knew C, C++, Visual Basic etc but not MFC. I think if you have a strong C++ background, then learning Qt is somewhat easier. There is QtAssistance which makes your life much easier. QtAssistance has everything but you need to find the proper function to fit in proper place.

I'm just assuming majority of attendant have knowlwdge on C, C++ and few on MFC. In that case what can be your classic idea????

By the way wysota, can you share some of your experiences learning Qt for the first time. I wil love to hear that.

One more small question.. Assume attendants knows only C, C++ and not other toolkits.( and NOTHING). You have 10 such people and you are asked to teach Qt to those people. How do you do proceed???? Please put down all you ideas.

This is going to be interesting.;) I'm eagerly waiting.

sunil.thaha
7th March 2007, 08:43
Assume attendants knows only C, C++ and not other toolkits.( and NOTHING). You have 10 such people and you are asked to teach Qt to those people. How do you do proceed????

Well, I would begin by sorting out how much of a C/C++ experience they have. If some of them know only C, then you should start teaching them with C++:confused: ( best of luck ) . I would first access the skill levels and then give lecture according to that. You cannot expect a C guy to know the polymorphisms in C++. So the minimum requirement would be that they should know C++ well. You could give a quick intro to C++.

If you have the copy of C++ Gui programming book. the Appendix B will help you.
It explains about Header files, breaking the program into different headers, Classes, subclassing. operator overloading, virtual mechanism ... If your students have trouble understanding it, then give assignments on that. Once C++ is done

I would start out with the Qt tutorials in the Assistant...
Gradually explain about the Designer. Give a couple of simple assignmenst like a notepad, calcuator, ...

These assignments will help them get a taste of Qt. Once that is done proceed to higher concepts like events, Subclassing widgets , creating a widget from sratch ..., Plugins etc

wysota
7th March 2007, 11:20
Ok I agree attendants have to have some knowledge on some toolkit but there can be cases where the attendants are just fresh passed out. They might have done some small project during their colleges. So there is possibility that they have some domain knowledge (might not be MFC). It can be either Visual Basics, Networking, C, C++, Computer Graphics, Java etc.
Java or Visual Basic are fine too. Let everyone program in the language/toolkit of their choice (be it Swing or VB).


When I learned Qt I only knew C, C++, Visual Basic etc but not MFC. I think if you have a strong C++ background, then learning Qt is somewhat easier. There is QtAssistance which makes your life much easier. QtAssistance has everything but you need to find the proper function to fit in proper place.
But you didn't attend a training for employees (God, what a hard word, I probably misspelled it). In that case the path has to be different.


I'm just assuming majority of attendant have knowlwdge on C, C++ and few on MFC. In that case what can be your classic idea????

Hmm.... Maybe this? :)

#include <QApplication>
#include <QPushButton>

int main(int a, char **b){
QApplication app(a,b);
QPushButton c;
c.setText("Hello world!");
c.show();
return app.exec();
}

And seriously prepare some slides explaining basic concepts of Qt (QObject memory management, signals and slots, object introspection) and then expand to add new topics. And make them write some code...


By the way wysota, can you share some of your experiences learning Qt for the first time. I wil love to hear that.
Oh, sure... no tutorials, trial and error, segfaults, segfaults, segfaults (when accessing GUI from worker threads)... and then I learned to use Assistant correctly :D Then registered at QtForum and started answering questions. That helped very much :) Oh and about half a year later I wrote my first more serious working application ("working" is the key word here).


One more small question.. Assume attendants knows only C, C++ and not other toolkits.( and NOTHING). You have 10 such people and you are asked to teach Qt to those people. How do you do proceed???? Please put down all you ideas.
I'll tell you in three months :)

vermarajeev
7th March 2007, 11:33
Oh, sure... no tutorials, trial and error, segfaults, segfaults, segfaults (when accessing GUI from worker threads)... and then I learned to use Assistant correctly :D Then registered at QtForum and started answering questions. That helped very much :) Oh and about half a year later I wrote my first more serious working application ("working" is the key word here).
I'll tell you in three months :)

Ha Ha Ha, Interesting!!!! I'm waiting for 3 months to get over.

Can you please tell me some assignments samples to be given.

thanks.