Garret
23rd March 2009, 18:10
Hi,
I have a litte trouble reading the background color of a QTableWidget cell.
everytime I use this:
this->myqtablewidget->itemAt(10, 3)->background().color()
it just reads the data from cell 0,0, and not 10,3 or anything else.
So whats the right way to check the background color of a cell? What do I wrong?
I thought of something like:
if(this->qtablewidget->itemAt( anyx(), anyy() )->background().color() == Qt::green)
dusomething();
I have a litte trouble reading the background color of a QTableWidget cell.
everytime I use this:
this->myqtablewidget->itemAt(10, 3)->background().color()
it just reads the data from cell 0,0, and not 10,3 or anything else.
So whats the right way to check the background color of a cell? What do I wrong?
I thought of something like:
if(this->qtablewidget->itemAt( anyx(), anyy() )->background().color() == Qt::green)
dusomething();