Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21715

Error compiling: PlaceholderText is not a member of QPalette

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: Qt Creator 4.8.0
    • Fix Version/s: None
    • Component/s: Widget Designer
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      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 one of the affected QLabels
      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, 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.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                kleint Friedemann Kleint
                Reporter:
                smurphy Sean Murphy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes