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

QML should handle QSharedPointer<QObjectDerived> types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.3.2
    • Fix Version/s: None
    • Labels:
      None

      Description

      It should be possible to read Q_PROPERTY(QSharedPointer<QObjectDerived>) from QML, use setContextProperty with a QVariant containing a QSharedPointer<QObjectDerived> or otherwise make such a type useful in the QML environment.

      Q_DECLARE_SMART_POINTER_METATYPE needs to be extended to register a conversion from QSharedPointer<QObjectDerived> to QSharedPointer<QObject> (and perhaps a conversion for std::shared_ptr too).

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              shausman Simon Hausmann
              Reporter:
              ske Steve
              Votes:
              15 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes