What do you mean? The view calls the delegate when it needs to update some part of its viewport. If you want to force a redraw, just update() the viewport (whole or part of it).
What do you mean? The view calls the delegate when it needs to update some part of its viewport. If you want to force a redraw, just update() the viewport (whole or part of it).
Where do I get viewport to update ?
C++ & AMD forever
From the view![]()
Is it so hard to answer more widely?
If I do so will it repaint my delegate ?
Thanks in advanceQt Code:
ItemDelegate delegate = new ItemDelegate(tableWidget); tableWidget->setItemDelegateForColumn(4, delegate); .......................................................... .......................................................... tableWidget->update();To copy to clipboard, switch view to plain text mode
C++ & AMD forever
No, it won't repaint your delegate, it will repaint your view. The delegate can't be "repainted", it is nothing visual, it's strictly a helper object that does some work on behalf of the view.
OkWill it repaint my progressbar ? Or will it call ItemDelegate:: paint() ?
C++ & AMD forever
It dependsIf nothing in the item changed, the view might not call the delegate (especially if the item is currently not visible), but in general case - yes, it will call your delegate's paint method.
In my case it doesn't want to update![]()
Could you suggest any other solutions ?
C++ & AMD forever
What exactly is your usecase? What exactly did you do and what do you want to achieve?
The thing is that I have a fancy progressbar that changes its colour depending on the state of download and when I start download the color doesn't change
It looks like on the first screenshot though it should look like on the second![]()
C++ & AMD forever
Do you update the values in the items?
Bookmarks