Home > Net >  Is there any solution to change color of QTableWidget's heads and items separately?
Is there any solution to change color of QTableWidget's heads and items separately?

Time:04-13

Is there any solution to change the font color of QTableWidget's heads and items separately using Qt Designer? I want to make a complete design in Qt Designer without using code to set any styles

CodePudding user response:

I wanted to add this as a comment but unfortunately my reputation is too low.

This should be possible by using a Stylesheet in the property editor. I can't test it right now but I assume it should look like these:

QTableWidget {
    color: red;
}
QHeaderView {
    color: blue;
}

Edit: I saw later that you asked without using code to set any styles. This is as far as I know not possible. But you can set the Style in property editor as I suggested, s.t. you can see the changes in the Qt Designer directly.

  • Related