Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
5.15.13
-
None
Description
Please run the attached reproducer on both 5.15.x and 6.4.x to see the difference. In 5.15.x, headers, scrollbars and corner button are not styled at all, while everything works out just fine in 6.4.x.
In 5.15.x, one has to explicitly set stylesheet for each single component in QTableWidget (as well as the QTableWidget itself) to get everything uniformly styled, such as:
ui->TableWidgetName->horizontalHeader()->setStyleSheet()
ui->TableWidgetName->horizontalScrollBar()->setStyleSheet()
ui->TableWidgetName->setStyleSheet()
And the corner button - somehow only styling QTableCornerButton in stylesheet for QTableWidget doesn't work. One has to also use:
QAbstractButton* btn = ui->TableWidgetName->findChild<QAbstractButton*>();
to access this private button and set stylesheet for it.
How to use reproducer:
1. Run the project in 5.15.x
2. Click either 'Schedule Editor' or 'Fanuc Mem' to see the issue
3. Switch to 6.4.x to see the difference