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

Qt6: QML_ELEMENT does not work with classes within namespaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.1.0 Alpha, 6.2
    • 6.0.0 Alpha
    • QML: Tooling
    • Linux/X11
    • b6a164891537d6d3a515d78a44b0de6595a170c2 (qt/qtdeclarative/dev)

      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.

        For Gerrit Dashboard: QTBUG-87266
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes