Qt-based multi-thread drawing method
A drawing method and multi-threading technology, applied in the field of multi-threaded drawing based on Qt, can solve problems such as large amount of information, long refresh time, and inability to respond to user input in a graphical interface in a timely manner
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0008] figure 2 The specific process of completing a refresh operation. QWidget is the basic graphical interface component in the Qt system. When it captures an exposure event, it will send a redraw / refresh signal, and then return the control of the main thread to the Qt event loop; after the application receives the signal, A drawing sub-thread will be generated, and the sub-thread is realized by overloading Qt's sub-thread class QThread; when the sub-thread is started, it will start the drawing work, and the drawn graphics will not directly reflect on the screen window, but first Stored in a private off-screen buffer, the thread-private off-screen buffer will be merged with the public buffer and copied to the screen in two cases: one is the end of the sub-thread, and the other is controlled by the timer; Due to the multi-thread mechanism, the drawing process can be interrupted. The interruption can come from the user's input. When the Qt event loop receives an interrupt ev...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 