is QT multithreaded or single-threaded?

Source: Internet
Author: User
Tags case statement

the single threaded GUI framework is not only available in Java: Qt, NextStep, MacOS Cocoa, Xwindows, and so on are all single threaded.

from process-oriented programming to object-oriented programming, the GUI interface is a thread that has been circulating, but today's brain is clogged with "how it works", and I tell myself it's object-oriented, not much to consider, like yourself. What loops do you think about? Object you just need to know when to create when to destroy the use of communication on the line, how he exists. But still feel itchy in the heart, and back to the C language.

Generally has the practical C language program all uses the subtitle Choice Interactive screen to make the program more friendly, the human machine interactivity is stronger. It is particularly important to have a loop output that is effective in controlling the letter selection screen. And the use of infinite controllable cycle is one of the efficient methods. The basic idea is. Create an infinite loop in the function that generates the letter screen, using the Switch,case statement or IF,ELSE statement to control the dynamic processing of the selection results in the loop body. If you want users to be more flexible with whether or not the program will continue to run or not, it can be implemented in the loop in a layer of loops. The program continues to function normally when the inner layer loops to the outer loop. When the inner loop changes the condition of the outer loop and satisfies the terminating condition, the outer infinite controllable loop ends. The program ends properly

so the QT heavy signal and groove mechanism is also single-threaded, the QT interface is just waiting for input GetChar () or what, after accepting the input to call the corresponding handler function, the processing function execution is completed to continue the loop. As for the signal and the slot is just the way of communication between objects, but the object is just a function, but the parameters between the function or data transmission, so that a little more comfortable, a half a day as if they do not understand anything, learning without thinking is not.

is QT multithreaded or single-threaded?

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.