How to set stylesheet for the current item in QTableView

后端 未结 3 995
攒了一身酷
攒了一身酷 2020-12-03 16:08

When QTableView edit control is visible for the current item the shylesheet of the edit takes place. When there is no active edit control in the QTableVie

3条回答
  •  时光说笑
    2020-12-03 16:52

    You need to create a new delegate, that renders itself based on the data model (custom role, for example). You need to base its style on a special control created for the purpose (that can be changed via stylesheet) . I'll post some code when I find time.

    One can use variadic templates, and crtp (Coplien) to good effect to layer one's delegates

提交回复
热议问题