PDA

View Full Version : QTableWidget



chak_med
17th May 2006, 16:25
I'am trying to use QTableWidget in an application. and I want to know how changing the pen of the vertical
and horizontal Line independently.

I found the function
void setGridStyle ( Qt::PenStyle style )

but the problem with this function is that it applies the same PenStyle on both Vertical and horizontal

Line of the grid . but I want to apply one penStyle for the vertical Line and another penStyle for

the horizontals.



can you help me?



thanks in advance.

jpn
17th May 2006, 16:53
Qt doesn't unfortunately support this out of the box.

You will have to override paint event and do the painting of grid's by yourself.
Take a look at src/gui/itemviews/qtableview.cpp:

void QTableView::paintEvent(QPaintEvent *event)
for reference how to paint a table (it looks a bit messy, I know..)