PDA

View Full Version : How to add a line by source code



Momergil
4th August 2013, 19:45
Hello!

This is actually a question that struggled me for quite some time...

When I'm at the Designer in Qt Creator, I can add a vertical or horizontal line in the .ui, an item that resembles a component such as the others... But I never was able to find such component to be #included and inserted by source code.

So which is the Line header file, so I may include and work with it by source code?


Thanks,

Momergil

Alundra
4th August 2013, 20:37
You can use a QFrame to have the result.


QFrame::HLine 0x0004 QFrame draws a horizontal line that frames nothing (useful as separator)
QFrame::VLine 0x0005 QFrame draws a vertical line that frames nothing (useful as separator)