PDA

View Full Version : QFrame V and H Line



bunjee
5th September 2008, 15:55
Hey there,

I'd like to have a QFrame : BOX and PLAIN with only :
- The right Vertical line.
- The bottom Horizontal line.

Like this :

http://bunjeee.free.fr/qFrame.png

Is it possible ?

jpn
5th September 2008, 15:57
QFrame::setFrameShape(QFrame::HLine)

bunjee
5th September 2008, 18:12
Draws a line separator at the center.

Not what I want.

aamer4yu
5th September 2008, 19:47
You can subclass QFrame and draw the lines urself, cant u :)

Junior
5th September 2008, 19:51
bunjee,


frame->setFrameShape( QFrame::StyledPanel );
frame->setStyleSheet( "border-width: 2px; border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-color: blue; ");

I usually figure out the context of the style sheet setting by opening designer and creating the object, then right click on the object and select "Change styleSheet" option to work out the kinks.

Hope this helps,

Junior

bunjee
5th September 2008, 20:30
Solved it this way :


q->setFrameStyle(QFrame::Box | QFrame::Plain);
q->setLineWidth(2);
q->setContentsMargins(0, 0, 2, 2);