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

QML_ELEMENT exposes types of arguments of all slots in .qmltypes-file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.0 RC, 6.9.0 FF, 6.9
    • 6.0.0 Beta1, 6.0.0 Beta2, 6.8.0 Beta3
    • QML: Tooling
    • None
    • d79043880 (dev), 2d44996c2 (6.8)

    Description

      When exposing a class, having a slot with a parameter, to QML using QML_ELEMENT, the parameter-type is exposed to QML even when the slot is never meant to be used by QML.

      class Example {
        QML_ELEMENT
        // ...
        public Q_SLOTS:
          void mySlot(ParameterClass param);
      }

      This behavior is new in Qt 6.8.

      Is there a way to suppress this behavior, so that the slot and parameter type do not appear in the *.qmltypes file generated by qmltyperegistrar?

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            jgreilich Julian Greilich
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes