Answer the question
In order to leave comments, you need to log in
Why is the style not being applied to QTableWidjet?
In the designer itself, everything looks good, but after compilation, the style does not work. Very strange for a newbie in QT, can someone explain? Thank you.
On the left is the compiled application, and on the right is the designer.
Of course, the style does not change anywhere in the code, and I tried to create a new project - the same thing.
The style code itself:
QHeaderView::section {
background-color: transparent;
color: #97A7BF;
font-size: 11px;
font-weight: bold;
}
Answer the question
In order to leave comments, you need to log in
What if you ask it like that?
tableWidget->horizontalHeader()->setStyleSheet(styleSheet);
tableWidget->verticalHeader()->setStyleSheet(styleSheet);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question