diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index d0ad169024..1b8e9890b5 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -10233,7 +10233,7 @@ void QWidget::ensurePolished() const Returns the mask currently set on a widget. If no mask is set the return value will be an empty region. - \sa setMask(), clearMask(), QRegion::isEmpty(), {Shaped Clock Example} + \sa setMask(), clearMask(), QRegion::isEmpty() */ QRegion QWidget::mask() const { @@ -12964,8 +12964,16 @@ QPainter *QWidget::sharedPainter() const widget, window system controls in that area may or may not be visible, depending on the platform. - Note that this effect can be slow if the region is particularly - complex. + Since QRegion allows arbitrarily complex regions to be created, widget + masks can be made to suit the most unconventionally-shaped windows, and + even allow widgets to be displayed with holes in them. Note that this + effect can be slow if the region is particularly complex. + + Widget masks are used to hint to the window system that the application + does not want mouse events for areas outside the mask. On most systems, + they also result in coarse visual clipping. To get smooth window edges, use + translucent background and anti-aliased painting instead, as shown in the + \l{Translucent Background} example. \sa windowOpacity */ @@ -13051,7 +13059,7 @@ void QWidgetPrivate::setMask_sys(const QRegion ®ion) Masked widgets receive mouse events only on their visible portions. - \sa clearMask(), windowOpacity(), {Shaped Clock Example} + \sa clearMask(), windowOpacity() */ void QWidget::setMask(const QBitmap &bitmap) { |