c++windowsqtqt5qtwinextras

QWinTaskbarProgress won't show


I'm using windows7 and Qt5.3.0 I added below to my MainWindow's constructor but nothing shows on my taskbar. Did I miss something?

QWinTaskbarProgress * pTaskbarProgress = new QWinTaskbarProgress(this);
pTaskbarProgress->setMinimum(0);
pTaskbarProgress->setMaximum(100);
pTaskbarProgress->setValue(50);
pTaskbarProgress->show();

Solution

  • See the example in the documentation:

    QWinTaskbarButton *button = new QWinTaskbarButton(widget);
    button->setWindow(widget->windowHandle());
    button->setOverlayIcon(QIcon(":/loading.png"));
    
    QWinTaskbarProgress *progress = button->progress();
    progress->setVisible(true);
    progress->setValue(50);
    

    Seems to me like you have to set this as part of a QWinTaskbarButton.