Qt for beginners Doc: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= | [toc align_right="yes&quot; depth="3&quot;]<br />[[Category:Qt_for_beginners]]<br />[[Category:Tutorial]]<br />[[Category:HowTo]] | ||
= Qt for beginners — Finding information in the documentation = | |||
[[Qt_for_beginners_Exercise_1_basis|<<< Exercise 1 : basis]] | [[Qt_for_beginners|Summary]] | [[Qt_for_beginners_Layouts|How to layout widgets >>>]] | |||
Qt documentation is a very valuable piece of information. It is the place to find ''everything'' related to Qt. But, Qt documentation is not a tutorial on how to use Qt. It is a collection of all information related to classes, as well as some examples. The goal of this chapter is to introduce you to the documentation as a basis for programming with Qt. | Qt documentation is a very valuable piece of information. It is the place to find ''everything'' related to Qt. But, Qt documentation is not a tutorial on how to use Qt. It is a collection of all information related to classes, as well as some examples. The goal of this chapter is to introduce you to the documentation as a basis for programming with Qt. | ||
==Where to find the documentation== | == Where to find the documentation == | ||
The best source of documentation is on the internet, in this developer network : | The best source of documentation is on the internet, in this developer network : | ||
"Qt documentation on developer network&quot;:http://doc.qt.io/ | |||
It provides the full doc, as well as some DocNotes, that users can add. These DocNotes give more examples, and highlight some tricky points. The online documentation also has a quite powerful search engine and contains also all the documentation for all versions of Qt. | It provides the full doc, as well as some DocNotes, that users can add. These DocNotes give more examples, and highlight some tricky points. The online documentation also has a quite powerful search engine and contains also all the documentation for all versions of Qt. | ||
Line 15: | Line 17: | ||
But it requires an internet connection. Without the internet connection, the doc is still available. If the QtSDK was installed correctly, the documentation that matches the current version of Qt should have been installed, and the ''Help'' section of QtCreator should not be empty. You can also use ''Qt Assistant'', that is a standalone doc browser. | But it requires an internet connection. Without the internet connection, the doc is still available. If the QtSDK was installed correctly, the documentation that matches the current version of Qt should have been installed, and the ''Help'' section of QtCreator should not be empty. You can also use ''Qt Assistant'', that is a standalone doc browser. | ||
==Important sections of the documentation== | == Important sections of the documentation == | ||
* Qt Assistant documentation | If you are running the offline documentation viewer, in either Qt Creator, or Qt Assistant, you will find in the summary that there are documentations for different components of the Qt SDK.<br />* Qt Assistant documentation<br />* Qt Designer documentation<br />* Qt Linguist documentation<br />* QMake documentation<br />* Qt reference documentation | ||
* Qt Designer documentation | |||
* Qt Linguist documentation | |||
* QMake documentation | |||
* Qt reference documentation | |||
The most important component is, of course, the Qt reference documentation. | The most important component is, of course, the Qt reference documentation. | ||
Qt documentation provides a nice introduction of many components, and also the documentation for all the classes in Qt. This list is listed in the page | Qt documentation provides a nice introduction of many components, and also the documentation for all the classes in Qt. This list is listed in the page "All classes&quot;:http://doc.qt.io/qt-4.8/classes.html. Another interesting page is the page that lists "All modules&quot;:http://doc.qt.io/qt-4.8/modules.html. This page provides information about the different components in Qt. | ||
* | In this tutorial, we will mostly use these modules<br />* "Qt Core&quot;:http://doc.qt.io/qt-4.8/qtcore.html<br />* "Qt GUI&quot;:http://doc.qt.io/qt-4.8/qtgui.html | ||
The search function is also quite important. If you know the class to use, and want to find the documentation, you can either type the name of this class in the search field (online), or in the filter in the index (offline). You can also search for methods and enumerations in these fields. | The search function is also quite important. If you know the class to use, and want to find the documentation, you can either type the name of this class in the search field (online), or in the filter in the index (offline). You can also search for methods and enumerations in these fields. | ||
==Browse the documentation of a class== | == Browse the documentation of a class == | ||
Classes documentation is always organized in the same fashion :<br />* Name and short description of the class<br />* Inheritance<br />* Enumerations<br />* Properties<br />* Public methods<br />* Public slots<br />* Signals<br />* Protected methods | |||
Let's take the "QTextEdit&quot;:http://doc.qt.io/qt-4.8/qtextedit.html class as an example. | |||
Revision as of 09:03, 24 February 2015
[toc align_right="yes" depth="3"]
Qt for beginners — Finding information in the documentation
<<< Exercise 1 : basis | Summary | How to layout widgets >>>
Qt documentation is a very valuable piece of information. It is the place to find everything related to Qt. But, Qt documentation is not a tutorial on how to use Qt. It is a collection of all information related to classes, as well as some examples. The goal of this chapter is to introduce you to the documentation as a basis for programming with Qt.
Where to find the documentation
The best source of documentation is on the internet, in this developer network :
"Qt documentation on developer network":http://doc.qt.io/
It provides the full doc, as well as some DocNotes, that users can add. These DocNotes give more examples, and highlight some tricky points. The online documentation also has a quite powerful search engine and contains also all the documentation for all versions of Qt.
But it requires an internet connection. Without the internet connection, the doc is still available. If the QtSDK was installed correctly, the documentation that matches the current version of Qt should have been installed, and the Help section of QtCreator should not be empty. You can also use Qt Assistant, that is a standalone doc browser.
Important sections of the documentation
If you are running the offline documentation viewer, in either Qt Creator, or Qt Assistant, you will find in the summary that there are documentations for different components of the Qt SDK.
* Qt Assistant documentation
* Qt Designer documentation
* Qt Linguist documentation
* QMake documentation
* Qt reference documentation
The most important component is, of course, the Qt reference documentation.
Qt documentation provides a nice introduction of many components, and also the documentation for all the classes in Qt. This list is listed in the page "All classes":http://doc.qt.io/qt-4.8/classes.html. Another interesting page is the page that lists "All modules":http://doc.qt.io/qt-4.8/modules.html. This page provides information about the different components in Qt.
In this tutorial, we will mostly use these modules
* "Qt Core":http://doc.qt.io/qt-4.8/qtcore.html
* "Qt GUI":http://doc.qt.io/qt-4.8/qtgui.html
The search function is also quite important. If you know the class to use, and want to find the documentation, you can either type the name of this class in the search field (online), or in the filter in the index (offline). You can also search for methods and enumerations in these fields.
Browse the documentation of a class
Classes documentation is always organized in the same fashion :
* Name and short description of the class
* Inheritance
* Enumerations
* Properties
* Public methods
* Public slots
* Signals
* Protected methods
Let's take the "QTextEdit":http://doc.qt.io/qt-4.8/qtextedit.html class as an example.