How do i change background of QTableView cells
Hello
i want to have a filtering system for my big table view that is populated from a database . i have a line edit and i can obtain tableview indexes that contain line edit's text but how do i change the QModelIndexList items' backgrounds ?:(
thanks
Re: How do i change background of QTableView cells
Every item has a widget, just set the background for that.
Code:
//'index' is 'QModelIndex' for item
//'table' is 'QTableView *' instance
//'PIXMAP_PATH' is your background image path
QWidget *widget
= table
->indexWidget
( index
);
widget->setPalette(p);
table->setIndexWidget( index, widget );