Unsolved QTreeView setStyleSheet has no effect
-
Hello,
I want to set background color of a selected inactive item in a QTreeView using style sheet as follows:
MyTreeView->setStyleSheet("QTreeView::item:selected:!active { background-color: rgb(150, 180, 220) }");
But the code has no effect in the tree view, but the similar code works for QTableView.
Can anyone tell me what I'm missing here?
Thanks in advance.
-
@soma_yarram said in QTreeView setStyleSheet has no effect:
background-color: rgb(150, 180, 220)
You missed a ;
background-color: rgb(150, 180, 220); //<-----