Thanks
I try:
tabla->setVerticalHeaderItem(3, hitem); // item is placed on the header of row r
tabla->setHorizontalHeaderItem(1, hitem);
tabla->setItem(1,1,hitem);
QTableWidgetItem *hitem = new QTableWidgetItem;
hitem->setBackground(QBrush(QColor(255, 0, 0, 7)));
tabla->setVerticalHeaderItem(3, hitem); // item is placed on the header of row r
tabla->setHorizontalHeaderItem(1, hitem);
tabla->setItem(1,1,hitem);
To copy to clipboard, switch view to plain text mode
If I do this, the verticalheader and the horizontalHeader changes the color but the cell (1,1) doesnt change.
Any help?
EDIT
--------------------
Well, I do it.
tabla->item(estara-1,0)->setBackground(QBrush(hola.fromHsv(0,75,255,255) ))
The other question.
The tablewidget is short, so when my program finds the appropiate cell I would like to the table moves automatically to this cell. This is possible?
Many thanks and sorry for my english!
Bookmarks