Preliminary anatomy of the whole process of QT event processing (Windows)

Source: Internet
Author: User
Tags win32

First, talk about the Qt event processing, under the Windows platform, of course, without Win32:

Basic structure of the WIN32 program:
1. Registration window;
2. Create a window;
3. Start the event cycle consisting of GetMessage and dispatchmessage;
4. The registered callback function WndProc is responsible for the corresponding various events;

Windows maintains a message queue for each Windows program that is currently executing:

  

The above is a simple introduction to the Windows message processing process;

Second, the QT event entry class:

Qapplication
:p ublic qguiapplication
:p ublic qcoreapplication
:p ublic Qobject (qobject Three responsibilities: memory management, introspection, event processing system)
GUI Application qapplication
GUI uses only QML qguiapplication
Non-GUI application qcoreapplication

First introduce a program can be started, capture system-level events, after capture if issued, before allowing Qt to do further processing, if not issued, QT is dumbfounded.

Third, the next step into the QT processing event flow, with flowcharts and some pseudo-code instead, it may be easier for everyone to understand:

The next step is the familiar process. Follow-up will specifically analyze the various levels of QT event-related issues.


Reprint marked the source, together learn to communicate, respect for the fruits of our work, together to create a civilized, loving community environment.

Preliminary anatomy of the whole process of QT event processing (Windows)

Related Article

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.