PDA

View Full Version : create non continuous vertical bar



bibhukalyana
6th May 2011, 14:56
Hi everyone,
I want to show fingerprint matching score in a non continuous vertical bar.I am also able to change the colour of the bar (can contain multiple colour).
Is there any predefine class present in qt or i have to create it ?
can any one give any example related to it ?
thanks

bibhukalyana
9th May 2011, 07:36
Can i use QProgressBar for this things ?

ChrisW67
9th May 2011, 10:01
You can make horizontal or vertical progress bars with QProgressBar (it's the first line of the docs). Use QProgressBar::setOrientation().

You can style the bar colour and whether the bar is solid or broken into segments (is that what you mean by "non continuous"?) with style sheets. The "Qt Style Sheets Reference" (look for it in Qt Assistant) contains links to an example.

bibhukalyana
9th May 2011, 12:35
Now it is working.
My style sheet is


QProgressBar {
border: 0px solid black;
text-align: top;
padding: 1px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 gray,

stop: 1 gray );
width: 15px;
}
QProgressBar::chunk {

border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
border: 1px solid black;
height:10px;
margin:0.5px
}




Now i want to give colour green to red from top to bottom .
How i will set colour to each chunk ?