PDA

View Full Version : QtWinExtras TaskbarButton Progress not turning red



qratman
25th April 2015, 22:01
Hi,

For some reason I can't set the programs taskbar progress indicator red as documented here (http://doc.qt.io/qt-5/qml-qtwinextras-taskbarbutton.html) and here (http://doc.qt.io/qt-5/qwintaskbarprogress.html#details). Setting paused to true
works fine by turning the color yellow.



import QtWinExtras 1.0

ApplicationWindow{
...
TaskbarButton{
id: taskbar
progress.visible: true
progress.stopped: true // should turn it red
progress.value: 95
}
...
}


The runtime output is: qrc:/main.qml:8 Invalid property assignment: "stopped" is a read-only property

How can I see inside the QtWinExtras module to make sure how it is defined?

The Qt version I am using is: 5.4.1

wysota
25th April 2015, 22:06
It is defined as a read only (const bool) value (QWinTaskbarProgress::stopped).

qratman
25th April 2015, 22:21
I see.

Then there's also the
void QWinTaskbarProgress::stop() in C++

Can I call this from QML somehow?

wysota
25th April 2015, 22:24
No idea :) I would probably report a bug about an incomplete API (in my opinion stopped in QML shouldn't be read-only).

qratman
25th April 2015, 22:38
Thanks for confirming. I'll report it.

anda_skoa
26th April 2015, 10:40
stop() is a slot, it should be callable from QML.

Cheers,
_

qratman
28th April 2015, 00:19
Yep. It works. It's not documented still (yet).

Also the other slots seem to be there actually.

anda_skoa
28th April 2015, 06:58
What do you mean it is not documented?

I see stop() being documented right here: http://doc.qt.io/qt-5/qwintaskbarprogress.html#stop

Cheers,
_