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:
1. click on the QLabel
2. In the property editor pane, click the Change Palette button for the palette 
property
3. In the Edit Palette dialog, scroll down to the PlaceholderText color role, 
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 
(5.9.6) I'm compiling with. I've reported this as 
https://bugreports.qt.io/browse/QTCREATORBUG-21715

I'm mostly tossing this here in case someone stumbles across the same issue, 
but if anyone has any thoughts on how to avoid this from happening in the first 
place, I'd appreciate it. From what I saw today, I think anytime I edit a .ui 
file that has any widgets with a customized palette, that Creator is going to 
update the .ui file incorrectly, and then I'm going to have to go back and fix 
it.

Sean

 


This message has been scanned for malware by Forcepoint. www.forcepoint.com
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to