0

I have made a treewidget within a navigation panel. The top item consist of the following three "subitems"

ActorColor | DeviceName | DeviceStatus (LED)

One layer lower, the child of this top item consists of the following subitems

Actorcolor | Title

(See image below)

This is how it looks like. The top item is called Test_01 and the layer item is called "Color: #ea6852"

This all goes well with updating etcetera. However, as soon as I click the layer item, the LED in the top layer gets replaced by an orange square. Both are defined as DecorationRoles in a custom QTreeItemDelegate

Function

  • Welcome to SO! Please provide some code, ideally something that reproduces the problem in the simplest way possible. It would help if you used real names of classes, properly capitalized. `QTreeWidget` vs. "treewidget" for example to be perfectly clear what you mean. There's no `QTreeItemDelegate` so that must be your custom one but we don't know anything about it. Cheers. Also not clear what you mean by "both are defined as DecorationRoles" -- there's only one of those per item, so I'm not sure how the green circle is even being shown there to begin with. – Maxim Paperno Nov 27 '19 at 12:35
  • provide a [mre] – eyllanesc Nov 27 '19 at 22:29
  • Hi Maxim/Eyllanesc, Thanks for your response; Above in the description I have provided a part of the code wherein I implement this feature. – Antoine Moghaddar Nov 28 '19 at 10:09
  • "Reproducible" means someone else can run it. Pretty hard to do with an image of code. And incomplete code at that. Still not even clear if you're using a QTreeWidget or QTreeView. (To reply to comments so that your recipient(s) are notified, use the [@ username](https://meta.stackexchange.com/questions/43019/how-do-comment-replies-work) system). – Maxim Paperno Nov 30 '19 at 08:26

0 Answers0