Unsolved How do I customizing QTreeView header by stylesheet
-
I am trying to style the header of a QTreeView but there is nothing in the style sheet examples page pertaining to the header.
my code
m_model = new QStandardItemModel(this); m_model->setHorizontalHeaderItem(0,new QStandardItem(QString("Key"))); m_model->setHorizontalHeaderItem(1,new QStandardItem(QString("Value"))); ui->treeView->setModel(m_model); QFile styleSheet = "./style/vmapViewer.qss"; styleSheet.open(QFile::ReadOnly); ui->treeView->setStyleSheet(styleSheet.readAll()); styleSheet.close();
my style sheet
QWidget { background-color: #2D3D46; } QTreeView { alternate-background-color: #171E22; } QTreeView::branch { color: #fff; } QHeaderView { color: #fff; background-color: #000; }
but as you can see, the headers are still white, along with the text
-
OK....then does anyone know how to find all the style sheet options for a particular object?
-