Priority: Not Evaluated
Affects Version/s: Qt Creator 4.8.0
Fix Version/s: None
Component/s: Widget Designer
I had an application that compiled just fine yesterday using Qt 5.9.6 and Qt Creator 4.7.x (sorry, can't remember the last digit, it might have been 2?). Today I made two changes before my next compilation attempt: I upgraded to Qt Creator 4.8.0 (revision d51ddbb8f0), and I edited my mainwindow.ui file in Qt Creator 4.8.0's form editor. Now when I attempt to compile I get multiple compile errors all of which are in the ui_mainwindow.h file, and all are:
'PlaceholderText' is not a member of 'QPalette'
Not sure if any of the following details matter but here they are anyway:
- It only appears to be happening on two widgets, both of which are QLabel
- I didn't modify this widgets between yesterday and today other than changing their parenting hierarchy
- Both labels do have a customized palette and as far as I know are the only ones that have a custom palette on my app. <- this detail is probably important somehow.
It appears I can fix the issue by the following steps:
- click on one of the affected QLabels
- In the property editor pane, click the Change Palette button for the palette property
- In the Edit Palette dialog, scroll down to the PlaceholderText color role, which is highlighted in bold indicating it has been modified, and hit the little arrow button that restores that color role to its default
Repeat steps 1-3 for the other label, save the .ui file, recompile and everything seems to be happy.
So it appears that the current version of Qt Creator is incorrectly inserting a color role that doesn't exist for the Qt kit I'm compiling with.