Hi.
If I select some cell in widget, then the header font start to be bold. I try to use setStyleSheet()
But it's not work. How to get normal font when some cell is select?m_ui->InfoWidget->horizontalHeader()->setStyleSheet("font: normal;");
Hi.
If I select some cell in widget, then the header font start to be bold. I try to use setStyleSheet()
But it's not work. How to get normal font when some cell is select?m_ui->InfoWidget->horizontalHeader()->setStyleSheet("font: normal;");
Hi,
The answer to your question can(and should) be found in the "Qt Style Sheets Reference" help page.
However, if it's not there, you may want to check help for QPalette.
Hope this helps,
codeslicer
Try this:
Qt Code:
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHorizontalHeaderItem:selected {font: normal;");To copy to clipboard, switch view to plain text mode
Thanks for replay, but is not working.
I tried before:
And it's not working, but this one is working:m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView::item {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView::item:selected {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView::section {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView::section:selected {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("section {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("section:selected {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("item {font: normal;}");
m_ui->InfoWidget->horizontalHeader()->setStyleSheet("item:selected {font: normal;}");
For QPalette --> I don't see any property for font, only text color, HighlightedText etc.m_ui->InfoWidget->horizontalHeader()->setStyleSheet("QHeaderView {background-color: lime;}");
Last edited by kazek3018; 30th December 2008 at 08:59.
Bookmarks