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

No explaination, no example on how to use C++ enmus in QML right way in Qt6

    XMLWordPrintable

Details

    • All
    • 377501f35 (dev), c05eb170d (6.6), 4cc830764 (6.5)

    Description

      People keep asking how to use C++ enums on the Qt Quick side. In Qt5, a few approaches were known, for example https://qml.guide/enums-in-qt-qml/ . This should not be used in Qt6. For Qt6, there is the Q_ENUM macro which should be used in combination with QML_ELEMENT. There is no example or other places in the docs explaining how this actually works, Maybe an entry in the new https://doc-snapshots.qt.io/qt6-dev/qtquick-how-tos.html would be a place for this

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              vminenko Vladimir Minenko
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes