Replace QTreeView::branch using pixmap ?
-
Hi,
One possible way is through Qt's stylesheet system.
-
I currently don't know if it's possible to have them inline in the style sheet. I would guess using base64 encoding but that's really only that, a guess. What you can do is to save your drawings as .png files in a suitable folder provided by QStandardPaths and then use them in the style sheet.
-
@Dariusz
Hi
Ok so it has to be 100% dynamical
so you create the actual pixmap runtime? it can be any color ?
Else you can just have the various versions in the resource file.You dont add anything to the resource file at runtime as its compiled into the exe ! :)
-
@mrjj Yep its dynamic and user can pick color, in future hell be able to draw his own shapes/icons and all that. But for now its pre-drawn using custom colors.
As far as I can tell I have to save to hdd and load it up via stylesheet & path...
Bummer :- )
-
Then maybe QTreeView::drawBranches is what you are looking for.