aboutsummaryrefslogtreecommitdiffstats
path: root/examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-21 10:45:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-22 10:15:44 +0200
commit4e9c35588ccb72f09df61b81a748bde92286b45e (patch)
treed2289c6a2ea90c4331463a5b9d8b28b0dd6b9d5a /examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc
parent75218552031152de935c9fd3290fb903da0a3d92 (diff)
Music player: Fix progress and thumb nail toolbar
A valid window handle must be set for this to work. Delay this until QWidget::show() and add documentation. Fixes: QTBUG-79348 Change-Id: Ib7db9568e0d70cb6194176f2da95a3b2087e403f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc')
-rw-r--r--examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc b/examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc
index 8908699..8b8fd57 100644
--- a/examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc
+++ b/examples/winextras/musicplayer/doc/src/qtwinextras-musicplayer.qdoc
@@ -100,9 +100,19 @@
\image qtwinextras-musicplayer-taskbar.png Screenshot of the Music Player taskbar
- The following snippet shows how the taskbar button is prepared. The playback
- progress is wired directly to the taskbar progress indicator by using signals
- and slots.
+ The following snippets show how the taskbar button is prepared.
+
+ For the taskbar and the thumbnail toolbar to work, a native window handle
+ must be set by passing an instance of \c QWindow to
+ \c QWinTaskbarButton::setWindow() or \c QWinThumbnailToolBar::setWindow(),
+ respectively. This instance is created in the process of \c QWidget::show()
+ and can be retrieved by calling \c QWidget::windowHandle() afterwards.
+ We override \c QWidget::showEvent() for this purpose:
+
+ \snippet musicplayer/musicplayer.cpp 7
+
+ The playback progress is wired directly to the taskbar progress indicator
+ by using signals and slots.
\snippet musicplayer/musicplayer.cpp 5