QTableWidget, grid color bug?
Hi!
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?
Thanks,
virag
Re: QTableWidget, grid color bug?
I don't understand, do you need to hide a grid?
Re: QTableWidget, grid color bug?
I need to hide the column lines (grids) between some items.
Re: QTableWidget, grid color bug?
I think you should write a delegate which will do this.
1 Attachment(s)
Re: QTableWidget, grid color bug?
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.
Re: QTableWidget, grid color bug?
try to hide a grid and look what will happen.
Re: QTableWidget, grid color bug?
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.