Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How can I access to items in a list/vector from JavaScript through QWebChannel
Forum Updated to NodeBB v4.3 + New Features

How can I access to items in a list/vector from JavaScript through QWebChannel

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 305 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    envisys
    wrote on last edited by envisys
    #1

    Hi,
    I have an List of QObjects. And I want to access to these objects from javascript.
    I can register the list object (QVector), but I cannot access to the Items in the client side.
    C++:

    class MyParentObject = QObject
    Q_OBJECT
    Q_PROPERTY(QVector<MyQObject> prop1 READ prop1 ...)
    Q_PROPERTY( prop2 READ prop2 ...)
    ...
    

    On the javascript side I want to do like this:

    alert(objects.parentObj.prop1.count);
    alert(objects.parentObj.prop1[0]);
    ...
    

    Can anybody help me please?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved