Hello Qt folks,

I'm working in PyQt, but I would be just as happy to have a C++ or general answer as well.

I have a tree view with an underlying model which is working fine. However, in one of the columns of the tree view, I want to add a group of push buttons that I want to control in my view/controller. Optimally, I would want to update the buttons based on the underlying model data. I have created the widget with these buttons in them, but I'm hoping somebody can help me understand how to set these buttons into the cells of a tree column.

From my understanding, this is done through delegates, but all I can manage to do is have these buttons pop up when the tree view cell is clicked for edit (via the createEditor function). I want the buttons to always be in the cell.

From the two delegate examples in the PyQt package:
- The SpinBoxDelagate example switches a number in a cell to a spin box widget when edited, which is not what I'm looking for (as mentioned above).
- The PyQt StarDelegate example does something similar to what I want but even in that example a QTableWidget is used, not a QTableView, and the StarRating widget is set explicitly in a setData call (something I don't have when using model-view).

Is there any way in the delegate (or otherwise) to specify that I don't want to only show the buttons on edit, but rather always?

Hope that makes sense and any help is much appreciated!