PDA

View Full Version : Widget to show multiple progress %ages in the same bar?



adith387
6th January 2011, 21:03
Hi,

I am trying to find a suitable widget to visualise the following data.

For one particular table item, I have a list of numbers (the list is small, usually 2-5) ; the size of list varies over time; the minimum and maximum values that the numbers can take are known (for example's sake, say, 0 and 100 respectively)

I want a neat way to show these numbers visually (the picture I have in mind is ... imagine the background of the cell's total width to be 100%. I draw a red line at the %age widths represented by these numbers) ... so, the QGraphicsScene seemed the way to go. However, the documentation suggests that if the %ages change over time then it is not ideal.

Now, QProgressBar appears to be the ideal thing if, instead of a list of numbers, I had a single number. So, I wanted to know if something analogous exists to display ...essentially, multiple progress %ages in the same bar?
Or any other widget that shows this neatly? (Worst case, might have to implement a dropdown list at each cell, with each item being a progress bar ... doesnt seem aesthetically pleasing).

Thanks in advance.

tbscope
7th January 2011, 04:28
Why not create a widget that contains multiple progress bars?
You can add custom slots and signals.
You can add functions to set a list of data at once (if that's what you want)
You can use stylesheets or similar to style the widget like you want.

adith387
7th January 2011, 17:02
Just wanted to assure myself I'm not reinventing the wheel I guess.

Thanks, I'll try making a custom widget.