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

QML WebChannel does not update registeredObjcets on registerObject

XMLWordPrintable

      Reproducer with sample index.html attached. First, start a local server (python -m http.server 8080 or something similar) at the location of index.html and then launch the reproducer.

      One should be able to confirm 2 things:
      1. WebChannel works fine. Message is echoed between QML and JS. That means "registerObject" works well.
      2. "registeredObjects" is an empty array, despite the fact that the object is in action already.

      Solution: use "WebChannel.id: <id>" + "webChannel.registeredObjects.push(<QtObject>)" instead. Documentation says that "registeredObjects" is read-only - that is not true.

        1. QTBUG138677.7z
          2 kB
          Luqiao Chen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            msarehn Arno Rehn
            luqiaochen Luqiao Chen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes