QWinThumbnailToolBar Class▲
-
Header: QWinThumbnailToolBar
-
Since: Qt 5.2
-
qmake: QT += winextras
-
Inherits: QObject
Detailed Description▲
Applications can embed a toolbar in the thumbnail of a window, which is shown when hovering over its taskbar icon. A thumbnail toolbar may provide quick access to the commands of a window without requiring the user to restore or activate the window.

The following example code illustrates how to use the functions in the QWinThumbnailToolBar and QWinThumbnailToolButton class to implement a thumbnail toolbar:
QWinThumbnailToolBar *
thumbbar =
new
QWinThumbnailToolBar(widget);
thumbbar-&
gt;setWindow(widget-&
gt;windowHandle());
QWinThumbnailToolButton *
settings =
new
QWinThumbnailToolButton(thumbbar);
settings-&
gt;setToolTip("Settings"
);
settings-&
gt;setIcon(":/settings.png"
);
settings-&
gt;setDismissOnClick(true
);
connect(settings, SIGNAL(clicked()), settingsPage, SLOT(show()));
QWinThumbnailToolButton *
playPause =
new
QWinThumbnailToolButton(thumbbar);
playPause-&
gt;setToolTip("Play/Pause"
);
playPause-&
gt;setIcon(":/play.png"
);
connect(playPause, SIGNAL(clicked()), mediaPlayer, SLOT(play()));
thumbbar-&
gt;addButton(settings);
thumbbar-&
gt;addButton(playPause);
See Also▲
See also QWinThumbnailToolButton
Property Documentation▲
[read-only] count : const int▲
This property holds the number of buttons in the thumbnail toolbar
The number of buttons is limited to 7.
Access functions:
-
int count() const
[since 5.4] iconicLivePreviewPixmap : QPixmap▲
This property holds the pixmap for use as a live (peek) preview when tabbing into the application
This property was introduced in Qt 5.4.
Access functions:
-
iconicLivePreviewPixmap() const
-
void setIconicLivePreviewPixmap(const QPixmap &)
[since 5.4] iconicPixmapNotificationsEnabled : bool▲
This property holds whether signals iconicThumbnailPixmapRequested() and iconicLivePreviewPixmapRequested() will be emitted
This property was introduced in Qt 5.4.
Access functions:
-
bool iconicPixmapNotificationsEnabled() const
-
void setIconicPixmapNotificationsEnabled(bool enabled)
See Also▲
[since 5.4] iconicThumbnailPixmap : QPixmap▲
This property holds the pixmap for use as a thumbnail representation
This property was introduced in Qt 5.4.
Access functions:
-
iconicThumbnailPixmap() const
-
void setIconicThumbnailPixmap(const QPixmap &)
See Also▲
window : QWindow*▲
This property holds the window whose thumbnail toolbar is manipulated
Access functions:
-
*window() const
-
void setWindow( *window)
Member Function Documentation▲
[explicit] QWinThumbnailToolBar::QWinThumbnailToolBar(QObject *parent = nullptr)▲
Constructs a QWinThumbnailToolBar with the specified parent.
If parent is an instance of QWindow, it is automatically assigned as the thumbnail toolbar's window.
[virtual] QWinThumbnailToolBar::~QWinThumbnailToolBar()▲
Destroys and clears the QWinThumbnailToolBar.
void QWinThumbnailToolBar::addButton(QWinThumbnailToolButton *button)▲
Adds a button to the thumbnail toolbar.
The number of buttons is limited to 7.
QList<QWinThumbnailToolButton *> QWinThumbnailToolBar::buttons() const▲
See Also▲
See also setButtons()
void QWinThumbnailToolBar::clear()▲
Removes all buttons from the thumbnail toolbar.
[since 5.4] void QWinThumbnailToolBar::iconicLivePreviewPixmapRequested()▲
This signal is emitted when the operating system requests a new iconic live preview pixmap, typically when the user ALT-tabs to the application.
This function was introduced in Qt 5.4.
See Also▲
See also iconicLivePreviewPixmap
[since 5.4] void QWinThumbnailToolBar::iconicThumbnailPixmapRequested()▲
This signal is emitted when the operating system requests a new iconic thumbnail pixmap, typically when the thumbnail is shown.
This function was introduced in Qt 5.4.
See Also▲
See also iconicThumbnailPixmap
void QWinThumbnailToolBar::removeButton(QWinThumbnailToolButton *button)▲
Removes the button from the thumbnail toolbar.