View Full Version : QTableWidget, grid color bug?

18th June 2009, 09:30

I use QTableWidget in one of my projects. The desired functioning is: every x seconds show some extended, colored items.

My problem is, that after I set the background color and extend some items, it works correctly. But when I change aftert x sec the background color and I extend other way the same items, the grid of the previous colored, extended items will be stuck and keep this previous color.

I tried to extend the whole table to one cell with background color white, and after extend to the other way, but henceforward the grid was stuck to the previous color.

Other solution could be to set the column width 0, but I've already tried and no effect.

Any idea, comment, experience?


18th June 2009, 09:52
I don't understand, do you need to hide a grid?

18th June 2009, 10:21
I need to hide the column lines (grids) between some items.

18th June 2009, 10:23
I think you should write a delegate which will do this.

18th June 2009, 10:35
1. How do you think this exactly?

2. I thought the setSpan function with the right parameters is that I've searched. It should be. ("Sets the span of the table element at (row, column) to the number of rows and columns specified by (rowSpanCount, columnSpanCount).")

I attach a pic about the problem.

18th June 2009, 10:39
try to hide a grid and look what will happen.

18th June 2009, 11:38
Ok, I've found setShowGrid(bool) function, and it works.

But on the other hand, I think setSpan could be the other good solution. Just I don't understand, how I should use it.