How and where to start Qt5
-
@JKSH said:
No need to apologize. You genuinely had a bad experience from that tutorial, and personally I also think it's more complex than necessary.
I do agree with you. I don't know why the designers of the documentations have arranged them that way. To me, they can very easily confuse any beginner.
In fact, even http://doc.qt.io/qt-5/gettingstartedqt.html is a bit more complex than necessary.
Exactly. I'd like to suggest the designers to have a look at the one you named "the best C++ tutorial" and rearrange their valuable contents that way to be as much useful as they can be.
The best C++ Qt tutorial I've seen is https://doc.qt.io/archives/4.3/tutorial-t1.html -- it starts out very simple and gradually adds more features. It doesn't use a Designer, everything is pure C++ code.
Yes, it really is. Thanks so much for introducing it to me. :-)
I'm in chapter 6 now and the codes are really straightforward and easy to follow. And since they are in C++, dealing with them for me is very easy and just as usual with my previous coding on MS VS while using C++.They even have a line-by-line walkthrough, where they explain what every bit of code does. It's a shame they removed this tutorial from recent versions of Qt.
Yes. I read them and also have done all of the exercises until now. :-)
Would you still be willing to give https://doc.qt.io/archives/4.3/tutorial-t1.html a chance? It was back in Qt 4.3, but it is still perfectly valid for Qt 5.5. If you're willing, here's what you should do:
- In Qt Creator, go to File -> New File or Project... -> Projects -> Application -> Qt Widgets Application (not Qt Quick Controls Application)
- Remove all the code from main.cpp. Replace it with the tutorial's code.
As I said, I looked and have read this tut so far. I think I should thank you so much that you cared about me and gave me another change to work on Qt while being connected with this website. :-) You are a really nice person. :-)
- At the bottom of the tutorial, ignore the instructions about using qmake. Instead, just press "Ctrl+R" like you did with the 1st tutorial.
But why please?
I ran cmd.exe by the start menu (of my Windows machine) then gave the path of Qt creator 3.6.0 (instead of Qt creator community) to that command prompt and then for each chapter of the tut I typed the following commands each one followed by hitting the enter key:
qmake -project
qmake
But I don't know what happened afterwards!
I read some about it but it isn't clear for me still. Let me please ask some questions on qmake!1- Why should (not) I use qmake?
2- What is its use for?
3- When and how can I use it and get its benefits?- Try to do the "Exercises" part at the bottom of the tutorial.
- Continue to do Chapters 2, 3, 4, 5, 6 and 7. (Chapter 8 onwards isn't as useful)
OK but what after chapter 7 please? Those codes are very exciting!
I also found this. Do you recommend that I go about reading it then? -
@JKSH said:
No need to apologize. You genuinely had a bad experience from that tutorial, and personally I also think it's more complex than necessary.
I do agree with you. I don't know why the designers of the documentations have arranged them that way. To me, they can very easily confuse any beginner.
In fact, even http://doc.qt.io/qt-5/gettingstartedqt.html is a bit more complex than necessary.
Exactly. I'd like to suggest the designers to have a look at the one you named "the best C++ tutorial" and rearrange their valuable contents that way to be as much useful as they can be.
The best C++ Qt tutorial I've seen is https://doc.qt.io/archives/4.3/tutorial-t1.html -- it starts out very simple and gradually adds more features. It doesn't use a Designer, everything is pure C++ code.
Yes, it really is. Thanks so much for introducing it to me. :-)
I'm in chapter 6 now and the codes are really straightforward and easy to follow. And since they are in C++, dealing with them for me is very easy and just as usual with my previous coding on MS VS while using C++.They even have a line-by-line walkthrough, where they explain what every bit of code does. It's a shame they removed this tutorial from recent versions of Qt.
Yes. I read them and also have done all of the exercises until now. :-)
Would you still be willing to give https://doc.qt.io/archives/4.3/tutorial-t1.html a chance? It was back in Qt 4.3, but it is still perfectly valid for Qt 5.5. If you're willing, here's what you should do:
- In Qt Creator, go to File -> New File or Project... -> Projects -> Application -> Qt Widgets Application (not Qt Quick Controls Application)
- Remove all the code from main.cpp. Replace it with the tutorial's code.
As I said, I looked and have read this tut so far. I think I should thank you so much that you cared about me and gave me another change to work on Qt while being connected with this website. :-) You are a really nice person. :-)
- At the bottom of the tutorial, ignore the instructions about using qmake. Instead, just press "Ctrl+R" like you did with the 1st tutorial.
But why please?
I ran cmd.exe by the start menu (of my Windows machine) then gave the path of Qt creator 3.6.0 (instead of Qt creator community) to that command prompt and then for each chapter of the tut I typed the following commands each one followed by hitting the enter key:
qmake -project
qmake
But I don't know what happened afterwards!
I read some about it but it isn't clear for me still. Let me please ask some questions on qmake!1- Why should (not) I use qmake?
2- What is its use for?
3- When and how can I use it and get its benefits?- Try to do the "Exercises" part at the bottom of the tutorial.
- Continue to do Chapters 2, 3, 4, 5, 6 and 7. (Chapter 8 onwards isn't as useful)
OK but what after chapter 7 please? Those codes are very exciting!
I also found this. Do you recommend that I go about reading it then?@tomy said:
I'd like to suggest the designers to have a look at the one you named "the best C++ tutorial" and rearrange their valuable contents that way to be as much useful as they can be.
You can submit suggestions to https://bugreports.qt.io/ (log in with the same account as you use for this forum). If you do, please post a link here so that others can follow it.
I'm in chapter 6 now and the codes are really straightforward and easy to follow.
...
I read them and also have done all of the exercises until now. :-)Wow, you're fast. Well done!
I ran cmd.exe by the start menu (of my Windows machine) then gave the path of Qt creator 3.6.0 (instead of Qt creator community) to that command prompt and then for each chapter of the tut I typed the following commands each one followed by hitting the enter key:
qmake -projectThis command asks qmake to produce a *.pro file.
qmake
This command asks qmake to read the *.pro file, and use it to produce a Makefile.
After this, you can use nmake (from Visual Studio) or mingw32-make (from MinGW) to use the Makefile to compile your program.
But I don't know what happened afterwards!
...
1- Why should (not) I use qmake?See my answer for #3 below.
2- What is its use for?
See my answers above ("This command asks qmake to...")
3- When and how can I use it and get its benefits?
Qt Creator already gives you the benefits automatically:
- When you created a new project, Qt Creator already produced a *.pro file for you (see the top-left corner of your window when you are editing your code). So, you don't need to call
qmake -project
yourself. - When you press Ctrl+R, Qt Creator calls
qmake
for you. first, and then runs nmake/mingw32-make for you. So, you don't need to callqmake
yourself.
If you want to see this in action, create a new Qt Widgets Application project and press Ctrl+R. Then, click "Window" -> "Output Panes -> "Compile Output". Read what's there -- this is like a "command prompt".
OK but what after chapter 7 please? Those codes are very exciting!
It's great to see your enthusiasm :)
If you want to continue Chapters 7 - 14, you can. I think it is still valuable experience for learning Qt's C++ API style. However, these chapters use the Graphics View Framework (see http://doc.qt.io/qt-5/graphicsview.html for info).
I think you will not likely use the Graphics View Framework in a real project. For a desktop project, Qt Widgets are great. However, for Android/iOS projects, you should learn Qt Quick/QML.
I also found this. Do you recommend that I go about reading it then?
The updated version of this manual is at http://doc.qt.io/qt-5/qtdesigner-manual.html . This manual tells you about the Qt Widgets Designer. I don't think it's useful to read it from start to finish.
Instead, I suggest the following:
- Do http://doc.qt.io/qtcreator/creator-writing-program.html. This is a very simple tutorial that teaches you how to use the Designer.
- Do http://doc.qt.io/qt-5/gettingstartedqt.html. I think you should be ready to follow this tutorial without problems.
- (Simple Exercise) Re-implement MyWidget from https://doc.qt.io/archives/4.3/tutorial-t5.html using the Qt Designer, instead of typing pure C++ code.
- (Advanced Exercise) Re-implement LCDRange AND MyWidget from https://doc.qt.io/archives/4.3/tutorial-t6.html using Qt Designer, instead of typing pure C++ code.
- Hint 1: You will need to create 2 separate classes in Qt Designer. Go to File -> New File or Project... -> Files and Classes -> Qt -> Qt Designer Form Class
- Hint 2: You will need to Promote a widget. See http://doc.qt.io/qt-5/designer-using-custom-widgets.html
- Think about your experiences so far. Which do you like better: Writing pure C++ code, or using Qt Designer? Can you see any advantages in the method that you don't like?
-
This is the link of the thread I posed the problem of the documentations on the bugreports.
https://bugreports.qt.io/browse/QTBUG-50944
I did it and hope they make some changes. :-)Thanks for the explanations on qmake.
If I think that you know my purposes on learning Qt, in what step(s) of my road-map do you think I will need to use qmake?Do http://doc.qt.io/qtcreator/creator-writing-program.html. This is a very simple tutorial that teaches you how to use the Designer.
I did those instructions just like what have been said. The project was good. I had no real difficulty. Although my problem is usually with the functions that are used in the source codes, but I understood all of them in this project well.
Thanks for introducing it.Do http://doc.qt.io/qt-5/gettingstartedqt.html. I think you should be ready to follow this tutorial without problems.
This one also a good one. The outcome (of my experience) was like the previous project. But some point: I haven't learnt to use qmake still (unfortunately)! And I couldn't do the part Building and Running from the Command Line :-( The instructions are not simple and clear apparently.
If you teach me (of course if it's possible) how to use it for that project, I'll learn it for the rest.(Simple Exercise) Re-implement MyWidget from https://doc.qt.io/archives/4.3/tutorial-t5.html using the Qt Designer, instead of typing pure C++ code.
Yes, I did it. It was just dealing with the Widgets and Properties on the Design mode. For the Signal and Slot for Lcd and Slider, I used the Edit Signals/Slots (f4) button on the toolbar and didn't wrote any code for it! I don't know it was the method you wanted I use or not.
(Advanced Exercise) Re-implement LCDRange AND MyWidget from https://doc.qt.io/archives/4.3/tutorial-t6.html using Qt Designer, instead of typing pure C++ code.
Hint 1: You will need to create 2 separate classes in Qt Designer. Go to File -> New File or Project... -> Files and Classes -> Qt -> Qt Designer Form Class
Hint 2: You will need to Promote a widget. See http://doc.qt.io/qt-5/designer-using-custom-widgets.htmlI tried several ways to build a class below the other one. I also tried to understand the link and do what is needed. Since I hadn't learnt a lesson on solving exercises like this before, I couldn't rely on my guesses too much. Although I found many traces but was not able finally. The solution was somewhat vague for me. Sorry anyway.
Think about your experiences so far. Which do you like better: Writing pure C++ code, or using Qt Designer? Can you see any advantages in the method that you don't like?
I like to answer to these when I solve the advanced exercise. To be honest, I don't fear the hard exercises but what I need is to be familiar with an instance of some exercise then solve the harder one :-)
Thanks so much for your time. I'm really uncomfortable if I'm bothering you by those many questions and problems.
-
This is the link of the thread I posed the problem of the documentations on the bugreports.
https://bugreports.qt.io/browse/QTBUG-50944
I did it and hope they make some changes. :-)Thanks for the explanations on qmake.
If I think that you know my purposes on learning Qt, in what step(s) of my road-map do you think I will need to use qmake?Do http://doc.qt.io/qtcreator/creator-writing-program.html. This is a very simple tutorial that teaches you how to use the Designer.
I did those instructions just like what have been said. The project was good. I had no real difficulty. Although my problem is usually with the functions that are used in the source codes, but I understood all of them in this project well.
Thanks for introducing it.Do http://doc.qt.io/qt-5/gettingstartedqt.html. I think you should be ready to follow this tutorial without problems.
This one also a good one. The outcome (of my experience) was like the previous project. But some point: I haven't learnt to use qmake still (unfortunately)! And I couldn't do the part Building and Running from the Command Line :-( The instructions are not simple and clear apparently.
If you teach me (of course if it's possible) how to use it for that project, I'll learn it for the rest.(Simple Exercise) Re-implement MyWidget from https://doc.qt.io/archives/4.3/tutorial-t5.html using the Qt Designer, instead of typing pure C++ code.
Yes, I did it. It was just dealing with the Widgets and Properties on the Design mode. For the Signal and Slot for Lcd and Slider, I used the Edit Signals/Slots (f4) button on the toolbar and didn't wrote any code for it! I don't know it was the method you wanted I use or not.
(Advanced Exercise) Re-implement LCDRange AND MyWidget from https://doc.qt.io/archives/4.3/tutorial-t6.html using Qt Designer, instead of typing pure C++ code.
Hint 1: You will need to create 2 separate classes in Qt Designer. Go to File -> New File or Project... -> Files and Classes -> Qt -> Qt Designer Form Class
Hint 2: You will need to Promote a widget. See http://doc.qt.io/qt-5/designer-using-custom-widgets.htmlI tried several ways to build a class below the other one. I also tried to understand the link and do what is needed. Since I hadn't learnt a lesson on solving exercises like this before, I couldn't rely on my guesses too much. Although I found many traces but was not able finally. The solution was somewhat vague for me. Sorry anyway.
Think about your experiences so far. Which do you like better: Writing pure C++ code, or using Qt Designer? Can you see any advantages in the method that you don't like?
I like to answer to these when I solve the advanced exercise. To be honest, I don't fear the hard exercises but what I need is to be familiar with an instance of some exercise then solve the harder one :-)
Thanks so much for your time. I'm really uncomfortable if I'm bothering you by those many questions and problems.
@tomy said:
This is the link of the thread I posed the problem of the documentations on the bugreports.
https://bugreports.qt.io/browse/QTBUG-50944
I did it and hope they make some changes. :-)Thanks for submitting!
in what step(s) of my road-map do you think I will need to use qmake?
I don't think you need to learn how to run qmake from the command line.
I haven't learnt to use qmake still (unfortunately)! And I couldn't do the part Building and Running from the Command Line :-( The instructions are not simple and clear apparently.
If you teach me (of course if it's possible) how to use it for that project, I'll learn it for the rest.You already ran qmake. You did it when you pressed Ctrl+R in your project.
(Simple Exercise) Re-implement MyWidget from https://doc.qt.io/archives/4.3/tutorial-t5.html using the Qt Designer, instead of typing pure C++ code.
Yes, I did it. It was just dealing with the Widgets and Properties on the Design mode. For the Signal and Slot for Lcd and Slider, I used the Edit Signals/Slots (f4) button on the toolbar and didn't wrote any code for it! I don't know it was the method you wanted I use or not.
Yes, that's what I meant.
I tried several ways to build a class below the other one. I also tried to understand the link and do what is needed. Since I hadn't learnt a lesson on solving exercises like this before, I couldn't rely on my guesses too much. Although I found many traces but was not able finally. The solution was somewhat vague for me. Sorry anyway.
- Create a
LCDRange
Qt Designer Form Class (lcdrange.ui). - Fully implement
LCDRange
like you did in the Simple Exercise. - Create a
MyWidget
Qt Designer Form Class (mywidget.ui). - Open
MyWidget
in Qt Designer. Drag a blankQWidget
onto theMyWidget
. - Right-click the blank
QWidget
and select "Promote to..." - Under "New Promoted Class", add
- Base class name: "QWidget"
- Promoted class name: "LCDRange"
- Header file: "lcdrange.h"
- Global include: YES
- Click "Add"
- Select "Promoted Classes" -> "LCDRange" and click "Promote".
- In main.cpp, create a MyWidget object and
show()
it. - Press Ctrl+R to build and run your project. Does your LCDRange appear?
- Open
MyWidget
in Qt Designer again. - Add 8 more blank QWidgets and promote them to LCDRanges. Put them in a grid layout.
- Press Ctrl+R to build and run your project. Do all 9 LCDRanges appear?
I like to answer to these when I solve the advanced exercise. To be honest, I don't fear the hard exercises but what I need is to be familiar with an instance of some exercise then solve the harder one :-)
That's a good way to learn
Thanks so much for your time. I'm really uncomfortable if I'm bothering you by those many questions and problems.
No, you are not bothering me. I'm happy to teach you because you work hard. :)
- Create a
-
Select "Promoted Classes" -> "LCDRange" and click "Promote".
OK until here.
In main.cpp, create a MyWidget object and show() it.
But there is no main.cpp there.
There are only mywidget.cpp and lcdrange.cpp C++ files there!
I tried to add the code snippet below into the mywidget.cpp and then run it but all of the run and build related buttons are grayed out!
I think it happend because we haven't created a complete Qt Widget Application project yet.int main(int argc, char *argv[]) { QApplication app(argc, argv); MyWidget widget; widget.show(); return app.exec(); }
-
Select "Promoted Classes" -> "LCDRange" and click "Promote".
OK until here.
In main.cpp, create a MyWidget object and show() it.
But there is no main.cpp there.
There are only mywidget.cpp and lcdrange.cpp C++ files there!
I tried to add the code snippet below into the mywidget.cpp and then run it but all of the run and build related buttons are grayed out!
I think it happend because we haven't created a complete Qt Widget Application project yet.int main(int argc, char *argv[]) { QApplication app(argc, argv); MyWidget widget; widget.show(); return app.exec(); }
@tomy said:
I think it happend because we haven't created a complete Qt Widget Application project yet.
Yes, that's the reason. You should create a Qt Widgets Application project, and then add the Qt Designer Form Classes to that project.
-
Press Ctrl+R to build and run your project. Does your LCDRange appear?
No unfortunately! :-(
What I did were these:
1- I created a Qt Widgets Application project named Advance. In the Class information page (Details) I entered QtMainWindow as the base class.
2- After creating that project, I went to File -> New -> ... and created a Project/File named LCDRange and applied on it the widgets just like the Simple example.
3- Then I created a new Project/File named MyWidget and put a blank QWidget on it and promoted it just like the instructions of #5.
4- In the main.cpp I entered this code:QWidget MyWidget; MyWidget.show();
Then ran the code.
This is the result:
http://uploads.im/gRFvA.pngFor the next time (another attempt) I created another Project this time named Advance2 but I entered QtWidget as the base class in the Class information page (Details) for this one. And the rest just like the process above. Then ran it. The same result!
http://uploads.im/OwnmD.png -
Press Ctrl+R to build and run your project. Does your LCDRange appear?
No unfortunately! :-(
What I did were these:
1- I created a Qt Widgets Application project named Advance. In the Class information page (Details) I entered QtMainWindow as the base class.
2- After creating that project, I went to File -> New -> ... and created a Project/File named LCDRange and applied on it the widgets just like the Simple example.
3- Then I created a new Project/File named MyWidget and put a blank QWidget on it and promoted it just like the instructions of #5.
4- In the main.cpp I entered this code:QWidget MyWidget; MyWidget.show();
Then ran the code.
This is the result:
http://uploads.im/gRFvA.pngFor the next time (another attempt) I created another Project this time named Advance2 but I entered QtWidget as the base class in the Class information page (Details) for this one. And the rest just like the process above. Then ran it. The same result!
http://uploads.im/OwnmD.png@tomy said:
QWidget MyWidget; MyWidget.show();
Here, you created a copy of the
QWidget
class. (Your variable type isQWidget
, and your variable name is "MyWidget").You should create a copy of your custom
MyWidget
class instead.You need to
#include
the header for your custom class, and then create a copy:#include "mywidget.h" // ... MyWidget w; w.show();
In my code above, the variable type is
MyWidget
, and the variable name is "w".Some questions:
- When you followed the tutorials and did the exercises before, did you run your code to make sure it's all correct?
- How much C++ experience do you have?
-
@JKSH said:
Here, you created a copy of the
QWidget
class. (Your variable type isQWidget
, and your variable name is "MyWidget").
You should create a copy of your customMyWidget
class instead.
You need to#include
the header for your custom class, and then create a copy:#include "mywidget.h" // ... MyWidget w; w.show();
In my code above, the variable type is
MyWidget
, and the variable name is "w".Yes, I know these topics about classes. Thanks.
The misunderstanding was that you said "create a MyWidget object" and I thought you meant something like "create an object named MyWidget". Sorry.Some questions:
- When you followed the tutorials and did the exercises before, did you run your code to make sure it's all correct?
Of course! Otherwise how could I say that "I've done the exercises!"? :-)
- How much C++ experience do you have?
I'm reading the book Programming Principle and Practice Using C++ by Stroustrup. And I have solved more than 95% of all the exercises so far. At the time being I'm entering chapter 20 of that book :)
After correcting the misunderstood part, it runs fine. I finish the project and then will be more ready to answer your previous question. :-)
-
OK, done!
Think about your experiences so far. Which do you like better: Writing pure C++ code, or using Qt Designer? Can you see any advantages in the method that you don't like?
Well, the writing pure C++ method has some advantages, like, almost whatever you need is built by your hand, that's you that create the program line-by-line. Since I have experienced many C++ console applications, I'm used to that kind of programming.
But this method has its own disadvantages! Since there isn't any graphical item for dealing with, the work is not exciting. You should almost all the time be rely on your own knowledge. It's like eating a dry food!The creating an application by the designer method is good! You are almost always involving with nice graphical widgets, the environments is colored and exciting! But this one has its own disadvantages as well! For example about the previous exercise, you need to be familiar with promoting a widget and creating Qt Designer Form Classes for the application. In fact, most of the time you are using mouse instead of keyboard in this environment. It's like eating a watery food like soup!
So if you ask about my preferences, I like both of them together not only one method alone.
I like to use the method where it's better than the other. When writing pure C++ code is simpler (and/or faster) than a designing mode I prefer the coding. On the other hand, if working with mouse make a thing simpler (and/or faster) I'd like to gain its benefits.Although it was my favorite way, but I don't this there is such a way for creating apps using Qt. And likely I have to choose one of those methods.
-
OK, so far, I have experienced good stuffs on Qt. I took advantages of good tuts-for-beginners offered by you nice guys especially JKSH. I thank you and also appreciate you all for supplying those helps. Now I feel better to start to read a good reference for going on the track.
Since I've installed the latest version of Qt creator IDE for being up to date I'd like to use the documentations, because they are updated as well, and their instructions fit much more better to the IDE.
But I fear I face the problems I saw at the first steps. So I feel I have to read something else.Since the only official, best-practice guide to Qt apparently is C++ GUI Programming with Qt 4 (2nd Edition) by Jasmin Blanchette and Mark Summerfield, I think if I have to make a choice, it's fine.
I try to carefully study it until a good book like this will be published about Qt5. Then I leave this and will read that new one.If you disagree with my decision or think it's not a good choice, I'll be thankful to aware me about it please.
Thanks to all.
-
OK, done!
Think about your experiences so far. Which do you like better: Writing pure C++ code, or using Qt Designer? Can you see any advantages in the method that you don't like?
Well, the writing pure C++ method has some advantages, like, almost whatever you need is built by your hand, that's you that create the program line-by-line. Since I have experienced many C++ console applications, I'm used to that kind of programming.
But this method has its own disadvantages! Since there isn't any graphical item for dealing with, the work is not exciting. You should almost all the time be rely on your own knowledge. It's like eating a dry food!The creating an application by the designer method is good! You are almost always involving with nice graphical widgets, the environments is colored and exciting! But this one has its own disadvantages as well! For example about the previous exercise, you need to be familiar with promoting a widget and creating Qt Designer Form Classes for the application. In fact, most of the time you are using mouse instead of keyboard in this environment. It's like eating a watery food like soup!
So if you ask about my preferences, I like both of them together not only one method alone.
I like to use the method where it's better than the other. When writing pure C++ code is simpler (and/or faster) than a designing mode I prefer the coding. On the other hand, if working with mouse make a thing simpler (and/or faster) I'd like to gain its benefits.Although it was my favorite way, but I don't this there is such a way for creating apps using Qt. And likely I have to choose one of those methods.
Oops, I'm glad our misunderstanding is cleared up now!
Good work on finishing the tasks.
@tomy said:
So if you ask about my preferences, I like both of them together not only one method alone.
I like to use the method where it's better than the other. When writing pure C++ code is simpler (and/or faster) than a designing mode I prefer the coding. On the other hand, if working with mouse make a thing simpler (and/or faster) I'd like to gain its benefits.That's a good analysis. I like your comparisons with food. ;)
So if you ask about my preferences, I like both of them together not only one method alone.
Although it was my favorite way, but I don't this there is such a way for creating apps using Qt. And likely I have to choose one of those methods.You can use both of them together. For example, you can create
LCDRange
by writing pure C++ code (produce lcdrange.h and lcdrange.cpp, but not lcdrange.ui), and createMyWidget
in Qt Designer. In Qt Designer, you can still promote a widget that was written in pure C++.But I fear I face the problems I saw at the first steps. So I feel I have to read something else.
What problems are you facing? Post new questions in this forum, and I'm sure you will get the help you need.
Since the only official, best-practice guide to Qt apparently is C++ GUI Programming with Qt 4 (2nd Edition) by Jasmin Blanchette and Mark Summerfield, I think if I have to make a choice, it's fine.
I try to carefully study it until a good book like this will be published about Qt5. Then I leave this and will read that new one.If you disagree with my decision or think it's not a good choice, I'll be thankful to aware me about it please.
I think that's a good idea. Even though that book is written for Qt 4, most of it is still applicable to Qt 5. (Note: That book is not official, but it's good).
In Qt Creator, you can also go to "Welcome" -> "Examples" and see the code of some sample programs.
One final piece of advice: I think one of the best ways to learn Qt is to develop a real project using Qt. Try to create a small but useful program for Windows, and use the documentation or forums when you get stuck.
Good luck, and happy coding!
-
One good way to learn about Qt is to attend training. Here is a link to some scheduled events organized by The Qt Company: http://www.qt.io/events/
In addition, several other companies organize training events around the world. For example, here is a link to some events organized by KDAB: http://www.kdab.com/training/schedule/