QT shows how to lighten the splash screen (double buffering and Noerase)

Source: Internet
Author: User

Many comrades in the QT program will meet the splash screen problem, sometimes very fast, but after all, the impact of the display effect, how to reduce the screen jitter or splash screen it?
I have tried the following ways:
1. Use double buffering. For example, if we draw multiple graphs in a widget, we first create a Qpixmap object and then use Qpainter to draw on the Qpixmap object, and then copy the data to the active Painterdev using the BitBlt.
2.QWdiget Objects Select Noerase when redrawing. Call repaint (false) to prevent the system from erasing the entire region at the time of drawing, which also avoids the splash screen. But this is not enough to remove the splash screen, because the system itself will call the repaint function, perhaps he will erase need to draw the Qregion area, so to ensure that you do not erase, you need to set the Wflags:wrepaintnoerase property in the Qwidget object. It does not seem to work directly through the setwflags in QT3, it needs to be passed in the Qwidget constructor.
Some people say or if not erase the picture will not be left the last drawing results, this need we do in the drawing of the time to do the cleanup, because it is on the qpixmap on the drawing does not affect the system active Painterdev so erase will not cause screen flicker.

Http://blog.sina.com.cn/s/blog_668aae7801017gj9.html

QT shows how to lighten the splash screen (double buffering and Noerase)

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.