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

QJSValueIterator while iterating over QObject skips methods and iterates over properties only.

    XMLWordPrintable

Details

    Description

      The code below prints only properties and not a single invokable method or slot.

      QJSValueIterator it(p_js_engine->newQObject(new MyQObject()));
      for(;it.hasNext(); it.next())
      qDebug() << it.name();

      Properties are declared like this:

      Q_PROPERTY(QString MyProperty READ GetMyProperty WRITE SetMyProperty)

      and methods like this:

      1. Q_INVOKABLE virtual void MyMethod();

      2. public slots:
      virtual void MySlot();

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            maxym Maxym Bilinets
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes