PDA

View Full Version : QTableWidget



deeee
25th May 2010, 11:18
Hello

I want to modify the frame of a table and make the lines thicker
Is there any solution
thanks

MarkoSan
25th May 2010, 11:26
Check window flags or reimplement virtual paint method.

deeee
25th May 2010, 11:57
Thanks for your quick reply.

I've searched in flags Qt::MatchFlags page but I I am not English native so I didn't manage to find what to use exactly to make the frame of the table look thicker and to separate tow rows with a thicker line .
Could you please help and be more precise .

aamer4yu
25th May 2010, 12:25
You can also try delegates,,,
in the delegates paint function, call the base class function to draw the cells... then draw a line over the bottom of rect...
this when done for all cells will give an effect that the rows are boldly painted..

deeee
25th May 2010, 13:35
My table is a QTableWidget and when I added this line table.setItemDelegate(new Delegate(table));
the program encountered a problem. Can use setItemDelegate with a QTableWidget ??

I also did'nt understand the paint function...
I'd be grateful if you explain more what should I do

aamer4yu
25th May 2010, 14:35
What does Delegate ctor take as a argument ? you are passing table, and it seems table is not a pointer but only object.

deeee
26th May 2010, 18:31
I don't really understand what I'm supposed to do to make it work...
can you be more specific please ?
Thanks a lot.