Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Passing Arguments to a C++ Model (QAbstractTableModel)
Forum Updated to NodeBB v4.3 + New Features

Passing Arguments to a C++ Model (QAbstractTableModel)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 501 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.
  • P Offline
    P Offline
    pgmQt
    wrote on last edited by
    #1

    I am writing a custom C++ QAbstractTableModel model to be used from a QML view.
    I have written a model as a C++ Plugin. This model is referenced by a TableView in a QML file. The Model is supposed to fetch data over a websocket from a remote database. Unfortunately in my setup the websocket has already been made from another View. How do I pass the connection handle or connection information to the Model so that it can fetch the data from server ? I cant find a way to pass arguments to my model. When are the Model objects instantiated ? Is it behind the scenes ? Is there a way of getting a handle to the Model constructor ?

    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