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

Qt6: QML_ELEMENT does not work with classes within namespaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 6.0.0 Alpha
    • Fix Version/s: 6.1.0 Alpha, 6.2
    • Component/s: QML: Tooling
    • Labels:
    • Platform/s:
      Linux/X11
    • Commits:
      b6a164891537d6d3a515d78a44b0de6595a170c2 (qt/qtdeclarative/dev)

      Description

      namespace Foo {
      
      class Bar
      {
          Q_OBJECT
          QML_ELEMENT
      }

      Yields in: Invalid QML element name "Foo::Bar"

      QML_NAMED_ELEMENT(Bar) works.

       

      I think it would be really useful if the namespace could be stripped automatically (especially since it fails with namespace anyway) instead of needing to repeat the name in each registration.

        Attachments

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

          Activity

            People

            Assignee:
            max.goldstein Maximilian Goldstein
            Reporter:
            ablu Erik Schilling
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes