@JonB
Thanks for the suggestion, but I did check that out -- it looks like setIndentation()/indentation() only deals with the space to right of the expand/collapse arrow (i.e., the ::branch subcontrol).
Any other ideas? :)
You can define an accessibleName for your objects and distribute different StyleSheets.
either via the designer or QWidget::setAccessibleName(const QString &name);
e.g.
QPushButton{
background-color: blue;
}
QPushButton[accessibleName="SpecialButton1"] {
background-color: red;
}
I finally managed to get custom colors. I gave my QTreeView an object name to be able to write this in CSS:
m_treeView->setObjectName("MyTreeView");
m_treeView->setStyleSheet("QTreeView#MyTreeView::item {color: none;}");
basically now my model controls text color through Qt::ForegroundRole regardless of the application's CSS.
I feel like it's the wrong place to put theming, but it works for me at the moment.
Well... until we decide to have different themes :-°