I have a QListWidget with several QListWidgetItems containing only text but with different background colors. By default the items become highlighted with a blue bar when I mouse over them. How can I disable the highlighting?
The code I use
//add spacer
QListWidgetItem *spacer = new QListWidgetItem("foo");
spacer->setBackgroundColor(QColor(Qt::gray));
spacer->setFlags(Qt::ItemIsEnabled); //disables selectionable
ui->listWidget->addItem(spacer);
Thanks in advance.
spacer
is the gray item with the name of the day
EDIT: added picture link (snipping tool Tool hides mouse, 6th item is highlighted)