Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ListModel property and C++
QtWS25 Last Chance

ListModel property and C++

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 636 Views
  • 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.
  • LunoL Offline
    LunoL Offline
    Luno
    wrote on last edited by
    #1

    Hi,

    I'm working on my project, which is using QAbstract model. Currently I need to use properties in my model, like this:
    ListModel {
    id: fruitModel
    property string language: "en"
    }

    Is it possible to use such properties from C++ code?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hazzl
      wrote on last edited by
      #2

      See the documentation under the section "Accessing Members of a QML Object Type from C++".

      1 Reply Last reply
      1
      • LunoL Offline
        LunoL Offline
        Luno
        wrote on last edited by
        #3

        Oops, thank you. I've thought that it's somewhere in QAbstract docs.

        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