Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Active Publication Date: 2016-02-03
SHENZHEN PANGO MICROSYST CO LTD
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Many computer-aided design CAD applications need to display and draw a large number of graphics on the screen. Due to the large amount of information, the refresh time may be relatively long. At this time, the graphical interface usually cannot respond to user input in a timely manner.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Qt-based multi-thread drawing method
  • Qt-based multi-thread drawing method

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a multithread drawing method based on Qt and belongs to the field of CAD (Computer-Aided Design). The multithread drawing method based on Qt is mainly used for realizing a CAD drawing editing tool. The invention aims to provide a method for drawing a graph through multithread in a Qt environment; the drawing efficiency can be increased; the better use experience is supplied; and the drawing process can be interrupted so as to prevent a user interface from being locked. The method comprises the following steps: designing an opening type drawing thread interface, comprising the starting, the synchronizing and the like of the thread; utilizing a timer and an off-screen buffer to realize the thread merging; and timely updating the drawing area and avoiding the flicker of a screen during a refreshing process.

Description

technical field [0001] The invention is a multi-thread drawing method based on Qt, belongs to the field of computer-aided design CAD, and is mainly used for realizing CAD drawing editing tools. Background technique [0002] Many computer-aided design CAD applications need to display and draw a large number of graphics on the screen. Due to the large amount of information, the refresh time may be relatively long. At this time, the graphical interface usually cannot respond to user input in a timely manner. How to improve the efficiency of drawing and provide better user experience is the problem to be solved by the present invention. [0003] Qt is a complete C++ application development framework for developing cross-platform graphical user interface applications. It provides an interface for drawing graphics, and can provide multi-threading and thread communication and synchronization mechanisms in applications. Contents of the invention [0004] The purpose of the presen...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/44
Inventor 杨若海黄国勇
Owner SHENZHEN PANGO MICROSYST CO LTD