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. Create some kind of context object

Create some kind of context object

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

    Hello,

    I would like to make some kind of context object. This object will contains properties that indicates in what page the user is, what component he is using, information about the user or any informations I will need to interract with something else.

    What is the best approach for this kind of things ? I'm used to this kind of object in the Web development but I'm not sure it is a good thing to do in Embedded with Qt/QML. If you have any suggestion I would be glad to have it.

    Thank you in advance

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Use a QObject-derived class, written in C++, and pass it to QML engine as root context property.

      (Z(:^

      1 Reply Last reply
      3
      • D Offline
        D Offline
        DavidM29
        wrote on last edited by
        #3

        I will do it that way ! It is a good idea
        Thanks

        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