diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-04-19 11:19:19 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-05-11 07:22:51 +0000 |
commit | d7a9e08f0ada36ad8ad44651f27a76c9c74e3428 (patch) | |
tree | e4093a502e10fc0b72ff2fbb98b6659f4be02ef5 /src/gui/kernel/qwindow_p.h | |
parent | 3ae34b7ead938dc716e2fad2fa686d6867466255 (diff) |
Make QWindow::setVisible() work for widgets
QWidget has its own setVisible() code that needs to
be run in order to correctly transition widget visibility.
It is desirable to be able to show and hide (native)
widgets also from the QWindow side, for example from
the platform plugin, or from generic QWindow handling
code in QtGui.
Add a new virtual QWindowPrivate::setVisible() and
move the QWindow visibility implementation there.
Subclasses can now override this function to add custom
code.
Make QWidgetPrivate::show/hide_sys() call the QWindowPrivate
setVisible implementation instead of the QWindow setVisible
public API.
Change-Id: I082f174b100659e1221d5898b490f8a9f498abdf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index cffe5b4125..9b8e2c47e4 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -132,6 +132,7 @@ public: virtual QWindow *eventReceiver() { Q_Q(QWindow); return q; } + virtual void setVisible(bool visible); void updateVisibility(); void _q_clearAlert(); |