Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.3
-
None
Description
Consider the following main file:
int main( int argc, char** argv )
{
QApplication app( argc, argv );
QTableWidget table;
table.setColumnCount( 10 );
table.setRowCount( 10 );
QPalette myPalette(table.palette());
myPalette.setColor( QPalette::Window, Qt::lightGray );
myPalette.setColor( QPalette::Base, Qt::lightGray );
table.setPalette(myPalette);
// This make the editor unawre of the "background" color of the table
//table.setStyleSheet("QTableView
");
table.show();
return app.exec();
}
This test case shows a 10*10 table with a grey background color. When you edit a cell (double-click on it), the cell stay gray during editing.
Now, uncomment the setStyleSheet line: the edited cell will become white during editing and return grey when the editor has been closed.