QTreeview DecorationRole changes on click but only after the mouse moves out of the row. Why?
-
I have a TreeView with two columns. The first column has an icon that changes when clicked. This works but when you click, it does not update until the mouse moves off of the row/column. Why does it wait for the mouse to be out of the row/column? How can I fix this?
I have implemented a MousePressEvent and all other functionality works (selections ect.).
-
I have a TreeView with two columns. The first column has an icon that changes when clicked. This works but when you click, it does not update until the mouse moves off of the row/column. Why does it wait for the mouse to be out of the row/column? How can I fix this?
I have implemented a MousePressEvent and all other functionality works (selections ect.).
@Tater said in QTreeview DecorationRole changes on click but only after the mouse moves out of the row. Why?:
Why does it wait for the mouse to be out of the row/column? How can I fix this?
Because you most likley doing something wrong (e.g. do not tell the view that something changed) but as you don't show code we can't say anything.