How to use Qt to add such a panel when clicking on the icon on the taskbar?

I tried to use QWinTaskbarButton , but I could not add anything except the progress bar.

enter image description here

    2 answers 2

    You need the QWinJumpList class from the same Qt Windows Extras module:

    http://doc.qt.io/qt-5/qtwinextras-overview.html#jump-lists

       int main(int argc, char *argv[]) { QApplication a(argc, argv); QWinJumpListItem* winLink = new QWinJumpListItem(QWinJumpListItem::Link); winLink->setFilePath("D:\\prog.exe"); winLink->setArguments(QStringList(QString("arg"))); winLink->setDescription("Some Description"); winLink->setIcon(QIcon("D:\\Icon1.ico")); winLink->setTitle("Some Text"); QWinJumpListCategory* myListCat = new QWinJumpListCategory; myListCat->setTitle("setTitle"); myListCat->addItem(winLink); myListCat->setVisible(true); QWinJumpList mainWinList; mainWinList.addCategory(myListCat); mainWinList.tasks()->setVisible(true); return a.exec(); } 

      For QWinJumpListCategory and QWinJumpListItem, you need to allocate memory dynamically, otherwise crash when you remove QWinJumpList