Qt Introductory Learning--QT 5 How to use the Help document

Source: Internet
Author: User

Qt Introductory Learning--QT 5 How to use the Help document

Learning graphic interface development, is certainly inseparable from the use of help documents, because it does not like C language as a few function interfaces, graphics interface can be used to describe the interface, the common we may be able to remember, the other really do not need to remember, use what to help document viewing usage.

We use Qt help documentation, which is mainly divided into the following steps:

1) Introduction to the use of the class

2) View the corresponding member function (function, parameter, return value) of the part (class) used

3) View the signal of the part

4) View the event of the part (how the virtual function is written)

1) Introduction to the use of the class

Move the cursor to the place where the class name is, then press "F1" to jump to the corresponding Help file:

Press "F1" again to display the Help document page in full screen, and press "ESC" to exit the Help document.

Description of the class:

A few important information to look at:

    • Public member functions: related functions for manipulating part properties.
    • Public slot function: A well-defined slot function in the QT class that can be connected directly to the signal.
    • Signal: Soft interrupt, such as pressing the button to trigger the pressed () signal.
    • Protection member function: The virtual function that the event corresponds to is usually placed here.
    • Event: A common event, such as a mouse event triggered by an action mouse.

Of course, we can enter the class you want to see directly in the " index " input box in " Help " mode:

2) View the corresponding member function (function, parameter, return value) of the part (class) used

View the corresponding member functions of the used part (the member function itself, the inherited member function), primarily to see how this member function is used, including functions, parameters, and return values.

The following is an example of Qpushbutton (normal button):

A) Select the "Public function" in the Qpushbutton class:

b) A brief description of the corresponding function:

c) Click on the function name to see its corresponding usage:

d) Many times, we need to use the inherited function , such as the button set content (SetText ()) is inherited from the Qabstractbutton:

Click "Qabstractbutton" to jump to the place where the Qabstractbutton public functions are:

Click the function name to see its usage:

e) During the operation, you may need to use "back", "forward" to switch pages back and forth:

f) A lot of things, we may need to look at the usage of a function when we use it.

First, you need to fill in the parameters of the function , then, the cursor moves to the function name, and then press "F1" to jump to the use of this function instructions:

3) View the signal of the part

Or take Qpushbutton as an example:

A) You cannot view signals information directly in the Qpushbutton class and need to find it in its base class "Qabstractbutton":

b) in "Qabstractbutton", select "signals":

c) In addition to its own signal, there are inherited signals:

d) Click on the signal name to see a description of the signal:

4) View the event of the part (how the virtual function is written)

Parts commonly used events are declared in Qwidget, select "Events" to see the relevant instructions:

Each event corresponds to an event function:

Description of the event function:

Qt Introductory Learning--QT 5 How to use the Help document

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.