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. Edit QSqlRelationalTableModel data from QML view
Forum Updated to NodeBB v4.3 + New Features

Edit QSqlRelationalTableModel data from QML view

Scheduled Pinned Locked Moved QML and Qt Quick
model-viewedit model from
1 Posts 1 Posters 707 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.
  • M Offline
    M Offline
    morte
    wrote on last edited by morte
    #1

    Hello,
    i have QSqlRelationalTableModel subclass where i reimplemented roleNames, data, setData methods, on QML side i want show model data in ListView with ability to change values.
    Displaying model data is ok, but there is problems with changing model values...

    With that delegate no changes provided to model and setData method never called:

    Component {
      id: delegate
      Item {
         SpinBox {
           value: treshold //treshold is an role
         }
      }
    }
    

    If i add:

           onValueCnaged: {
             treshold = value;
           }
    

    that brings endless binding loop

    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