Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111396

Cannot provide palette through c++ code

XMLWordPrintable

      In Qt 5 it was possible to assign QPalette to ApplictationWindow, but in Qt 6 it is now QQuickPalette and that class is private.

      For example, one might want to do something like:

      ApplicationWindow {
       palette: MyPalette.currentPalette
      }
      

      But this does not seem possible to do with c++.

      Internally the QQuickPalette class also seems to be able to construct the palette from QPalette, maybe exposing this and making it possible to initialize the Palette type from QPalette in QML code could be one a solution.

      Another solution could be to make QQuickPalette public so that it can be constructed fully from c++ code.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            poikelin Joni Poikelin
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes