Celes
November 12, 2024, 12:16pm
2
Yes, you can subclass it:
Hi
Sorry, didn’t had the time to answer before
It won’t be easy.
In theory you have to override the sizeHint() method of QItemDelegate object of QTreeView.
Then the sizeHint() is called internally (you don’t call it by yourself) and methods from QItemDelegate are called with this size.
In Krita, the QItemDelegate object is called here .
You can see the delegate property is an instance of NodeDelegate class which extend a QAbstractItemDelegate.
This class is not available in …
I’m customizing the appearance of Krita (it’s lovely but claustrophobic!) and one panel I can’t fully get to is the layer panel. I’d love to alter the size of the icons (lock, alpha, visbility, etc) or even the icons themselves and change the appearance of selected layers row.
It’s possible to change the appearance of all rows at once through css (QTreeView::item), of folder rows (QTreeView::item:has-children), and of the middle column containing layer name and type icon of selected layers (QTr…
But it’s hard work indeed, you have to recreate the entire structure in Python and use hacks to display all information about the layer state like whether it’s visible and locked because that data can’t be accessed directly from the API.