Buttons of class QWinThumbnailToolButton - one of the options available only for Windows (7 and older). You could see such buttons in Windows Media Player
Step-by-step instruction
To use these buttons, you need to
Connect the winextras module to the project
QT += winextras
Create a QWinThumbnailToolBar class panel and bind it to the window
thumbnailToolBar = new QWinThumbnailToolBar(this); thumbnailToolBar->setWindow(windowHandle());
Add the following code to the constructor:
if (QtWin::isCompositionEnabled()) QtWin::extendFrameIntoClientArea(this, 0, 0, 0, 0); else QtWin::resetExtendedFrame(this);
Now you can create a button (buttons) and bind it (them) to the panel
B1 = new QWinThumbnailToolButton(thumbnailToolBar); thumbnailToolBar->addButton(B1);
Conclusion
These buttons work just like QPushButton. For example, you can set an icon for the button using the setIcon() method, associate its clicked() signal with any slot, and so on. A unique property of this class is the boolean variable, dismissOnClick . If its value is set to true (setDismissOnClick (true)), then after clicking on the corresponding button the panel will instantly be wrinkled. Otherwise, the panel will be available until the user moves the mouse away from it. The maximum number of buttons that can be added to the QWinThumbnailToolBar panel is 7.
Using the flat (setFlat (true)) property, you can make the button invisible and use it as a separator between groups of buttons, as in the figure below.