qt - How to set stylesheet for the current item in QTableView -
when qtableview edit control visible current item shylesheet of edit takes place. when there no active edit control in qtableview current item styled using qtableview { selection-background-color: } how set different style current item?

qt style sheets support sub-controls , pseudo states, can use improve customization. (see http://qt-project.org/doc/qt-5/stylesheet-reference.html#list-of-pseudo-states )
in case can use ::item sub-control , :focus pseudo state (the "current" pseudo state doesn't exist, :focus same).
this example can use:
qtableview::item:focus { selection-background-color: yellow; } 
see http://qt-project.org/doc/qt-5/stylesheet-examples.html#customizing-qtreeview
Comments
Post a Comment