P
P
Profi_GMan2018-01-30 16:32:39
Qt
Profi_GMan, 2018-01-30 16:32:39

QWinTaskBarProgress not working, what am I doing wrong?

Good day!
QWinTaskBarProgress not working, what am I doing wrong?
There is a gui class. It has QWinTaskbarButton and QWinTaskbarProgress fields. Initialized them in the constructor like this:

if (QtWin::isCompositionEnabled())
        QtWin::extendFrameIntoClientArea(this, 0, 0, 0, 0);
    else
        QtWin::resetExtendedFrame(this);

    taskBarButton = new QWinTaskbarButton(this);
    taskBarButton->setWindow(windowHandle());
    taskBarProgress = taskBarButton->progress();
    taskBarProgress->setVisible(true);

Next in the method I do
taskBarProgress->setRange(0, size * 2);// size - переменная int
    taskBarProgress->setValue(size);
taskBarProgress->setVisible(true);
    taskBarProgress->show();

but nothing works
. And if I do this(show(), setValue()) immediately after initialization, everything works.
What am I doing wrong?
PS Full code here

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question