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.
You need the QWinJumpList class from the same Qt Windows Extras module:
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
Source: https://ru.stackoverflow.com/questions/694681/
All Articles