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

Pointers are not converted to QVariant for method call

    XMLWordPrintable

Details

    Description

      Arguments for methods are not accepted if you try to pass the pointer to QObject/QGraphicsItem-derived class. For example:

      >>
      function setModel(aModel)

      { lv.model = aModel; }

      ListModel

      { id: lm }

      ListView

      { id: lv }

      Component.onCompleted: lv.setModel(lm);
      >>

      will cause

      >>
      test.qml:15: TypeError: incompatible type of argument(s) in call to setModel(); candidates were
      setModel(QVariant)
      >>

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            kolam Paul Kolomiets
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes