Hello all,

i have read some documents but the codes there are mostly invalid.

Qt Code:
  1. int main(int argc,char ** argv)
  2. {
  3. QApplication app(argc,argv);
  4.  
  5. QListView* view = new QListView();
  6. QStringListModel* model = new QStringListModel((QString("1;2;3;4;5").split(";")));
  7. QPalette palette;
  8.  
  9. palette.setColor(QPalette::Highlight,Qt::red);
  10. view->setPalette(palette);
  11. view->setModel(model);
  12.  
  13. view->setWindowTitle("QListView Selected Item Bg Color");
  14. view->show();
  15.  
  16. return app.exec();
  17. };
To copy to clipboard, switch view to plain text mode 

for example the code above is a sample which peole use it to set the background color. I run this sample and the color remains still the same.

Unbenannt.png