QProgressBar Chunk
I’ve tried google for this, but I’m not sure what to search for.
I’m looking for a way to change a QProgressBar so that only a chunk with a fixed size is moving. That is, the progress bar is not filling up from one side to another, but that only a chunk/part is moving from one side to another. (If the progress bar is 100px, I only want a 10px chunk moving from left to right).
I think I saw something like this in KDE.
9 replies
Hi,
look at the class documentation: QProgressBar [doc.qt.nokia.com]
It’s a bit tricky, but set minimum = 0, maximum=0, value=-1.On windows, that works …
I tried it with differen styles (modife, CDE, plastique, cleanlooks, windows, windows XP, windows vista) and it worked in all.
And I tried to style it, it is also possible:
- background-color: #05B8CC;
- width: 20px;
- }
used as style sheet. See Styling the progress bar [doc.qt.nokia.com]
It is a marquee bar.
From Qt Documentarion:
If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QNetworkAccessManager to download items when they are unable to determine the size of the item being downloaded.
Tested and working
You must log in to post a reply. Not a member yet? Register here!



