View Issue Details

IDProjectCategoryView StatusLast Update
0038592LazarusWidgetsetpublic2021-03-05 22:59
ReporterZoë Peterson Assigned To 
Status newResolutionopen 
Product Version2.0.13 (SVN) 
Summary0038592: LCLQT5 doesn't call ThemeServices.OnThemeChange
DescriptionLCLQT5 doesn't call ThemeServices.OnThemeChange when the style is changed via QApplication_setStyle or externally if you're using qt5ct and change the system style while it's running. TQtWidgetSet.EventFilter does have a case for QEventStyleChange that gets hit a bunch, but it never matches the "Sender = QCoreApplication_instance" check.

It seems like OnThemeChange should also be called when the application palette changes (related issue, 0038589)
Steps To ReproduceThe attached app has a listbox on the left that lists all of the styles available, and clicking on an item calls QApplication_setStyle. The SetPalette button just sets the application palette to random colors. The listbox below the button should add a message any time OnThemeChange or WMThemeChanged are encountered, but neither of them ever are.

To test, run it and click on the various styles, or install qt5ct, use the "qt5ct-style" style, then run qt5ct while the test app is still open and change the active style or palette. Adding a WriteLn in TQtWidgetSet.EventFilter's QEventStyleChange, outside the if block, does get hit.
TagsNo tags attached.
Fixed in Revision
Attached Files


Zoë Peterson

2021-03-05 22:59


QtThemeChange.tgz (109,975 bytes)

Issue History

Date Modified Username Field Change
2021-03-05 22:59 Zoë Peterson New Issue
2021-03-05 22:59 Zoë Peterson File Added: QtThemeChange.tgz