In Qt 4.4, the Alien widget was born (window is responsible for contacting the Windows system. Alien is known as the Terminator of all flashes)

Source: Internet
Author: User

September 29, 2011 23:47:46Hits: 7269

Qt 4.0

Automatically double-buffers

Qt 4.1

Qwidget::autofillbackground

Qt 4.2

Delayed widget Creation (in)

Stylesheet

Qt 4.3

Qwidget::render

Qt 4.4

Alien Widget

Qt 4.5

Translucent Windows

Qt 4.6

Widget ' s graphics effect

Qt 4.8

Lighthouse (QPA)

Qt4.0
    • In QT 4.0, double buffering is enabled, eliminating the need to write double-buffered code in PaintEvent () to avoid flicker.
Qt4.1
    • In QT 4.1, the widget no longer has any default backgrounds by enabling background auto-delivery (propagation). Introduce Backingstore this thing.

Qt4.2
    • In Qt 4.2, the introduction of the delay control creation (delayed widget creation) allows widgets to be created without a real window handle.

Qwindowsurface and Qwidgetbackingstore

Even though Qwidget is a qpaintdevice subclass, one would never render directly into a qwidget ' s surface. Instead, during the paintevent, the painting is redirected-an offscreen surface which are represented by the internal CL The Qwindowsurface.

Qwidgetbackingstore is responsible for figuring out which parts of the window surface needs to being updated prior to showing It to screens, so its really a repaint manager.

When the concept of Backingstore is introduced in Qt 4.1, the both classes were the same, but the introduction of more Var Ying ways to get content to screens made us split it in.

Qt4.4
    • In Qt 4.4, the Alien widget was born so that windows and widgets, while still the same class, were different things. window is responsible for contacting the Windows system. Alien is known as the Terminator of all flashes, see Qt invaded by aliens-the end of the all flicker.

Qt::wa_nativewindow

Create a native form with a handle

Qt::wa_paintonscreen

Force a native form to be created

Qt::window

Top-level window, must be a native form (?)

Qglwidget

Must be a native form

If a widget is already a alien widget, setting the above flag on it, or calling the Winid () function on it, will cause it to be re-created as a native widget.

Qt4.5
    • In QT 4.5, the concept of the graphics system is introduced (for example, the options are: raster|opengl|x11|native, etc.). It has a qt::wa_translucentbackground attribute, which is somewhat easier to mix with qwidget::setwindowopacity () .

The qwidget::setwindowopacity () function sets the overall opacity of the form (i.e., IsWindow () as a true widget), from 0.0 to 1.0, and the larger the value the more opaque.

Qt::wa_translucentbackground, this property can be set individually for each qwidget. Areas that are not drawn (the background) are transparent, and the transparency of the drawn area is controlled by the color or the alpha channel value of the picture.

Qt4.6
    • In Qt 4.6, the graphics effect is introduced. However, it is now not recommended to use:

Graphics Effectsstate:deprecatedreasoning:flawed design, we don ' t recommend taking maintainership of this code.< /c2>

Qgraphicseffect subclasses need to re-implement the draw () function.

To install the Qgraphicsopacityeffect Qwidget as an example, when a redraw is required, Qwidgetprivate::d rawwidget () is not sending a qpaintevent event to invoke our PaintEvent () Instead, it calls Qgraphicsopacityeffect's draw () function, which, within the function, Qwidget::render () calls PaintEvent () to draw the contents into a qpixmap, Then set the opacity of the Qpainter and draw the Qpixmap to the target.

Qt4.8
    • In Qt 4.8, the formal introduction of lighthouse ...
Reference
    • http://labs.qt.nokia.com/2011/04/01/qt-hidden-gems/

    • http://labs.qt.nokia.com/2009/02/13/bnilsenflush/

    • http://labs.qt.nokia.com/2009/12/16/qt-graphics-and-performance-an-overview/

    • http://labs.qt.nokia.com/2008/02/04/qt-44-and-painting-performance/

    • Http://labs.qt.nokia.com/2008/05/12/qwidget-vs-graphics-view-ding-ding-ding

    • http://labs.qt.nokia.com/2007/08/09/qt-invaded-by-aliens-the-end-of-all-flicker/

    • http://www.cuteqt.com/blog/?p=340

6835722

In Qt 4.4, the Alien widget was born (window is responsible for contacting the Windows system.) Alien is known as the Terminator of all flashes)

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.