Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Dynamic PropertyGrid with QML and C++
Forum Updated to NodeBB v4.3 + New Features

Dynamic PropertyGrid with QML and C++

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 3.7k 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.
  • K Offline
    K Offline
    kappa
    wrote on last edited by
    #1

    Hello.
    I have something like PropertyGrid defined in QML (using GridView element).
    I can add my elements (PGRow, which is a row with two rectangles with labels). I'm doing it using ListModel:

    @
    GridView {
    [...]
    delegate: rowDelegate
    model: pgModel
    }

    ListModel{
        id: pgModel
        objectName: "pgModel"
        ListElement{
            caption: "Property 1"
            value: "12345"
        }
    }
    Component{
        id: rowDelegate
        PGRow{
            caption: model.caption
            value: model.value
        }
    }
    

    @

    My problem is: I want to add rows dynamically using C++. How should I do it?
    I've read this: "Using QML Bindings in C++ Applications":http://doc.qt.nokia.com/4.7-snapshot/qtbinding.html but still have no idea how to get to the pgModel elements from C++.

    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