

Definition at line 34 of file q3widgetstack.cpp.
Public Member Functions | |
| Invisible (Q3WidgetStack *parent) | |
| const char * | className () const |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *) |
| Q3WidgetStackPrivate::Invisible::Invisible | ( | Q3WidgetStack * | parent | ) | [inline] |
Definition at line 37 of file q3widgetstack.cpp.
00037 : QWidget(parent, "qt_invisible_widgetstack") 00038 { 00039 setBackgroundMode(NoBackground); 00040 }
| const char* Q3WidgetStackPrivate::Invisible::className | ( | ) | const [inline] |
| void Q3WidgetStackPrivate::Invisible::paintEvent | ( | QPaintEvent * | ) | [inline, protected, virtual] |
This event handler can be reimplemented in a subclass to receive paint events which are passed in the event parameter.
A paint event is a request to repaint all or part of the widget. It can happen as a result of repaint() or update(), or because the widget was obscured and has now been uncovered, or for many other reasons.
Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: QPaintEvent::region(). This speed optimization does not change the result, as painting is clipped to that region during event processing. QListView and QTableView do this, for example.
Qt also tries to speed up painting by merging multiple paint events into one. When update() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see QRegion::united()). repaint() does not permit this optimization, so we suggest using update() whenever possible.
When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background.
The background can be set using setBackgroundRole() and setPalette().
From Qt 4.0, QWidget automatically double-buffers its painting, so there's no need to write double-buffering code in paintEvent() to avoid flicker.
Note: Under X11 it is possible to toggle the global double buffering by calling qt_x11_set_global_double_buffer(). Example usage:
...
extern void qt_x11_set_global_double_buffer(bool);
qt_x11_set_global_double_buffer(false);
...
Reimplemented from QWidget.
Definition at line 46 of file q3widgetstack.cpp.
References QWidget::QPainter, and QWidget::rect().
Here is the call graph for this function:

1.5.1