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. Two full functional QSqlRelationalTables, problem with adding a record
Forum Updated to NodeBB v4.3 + New Features

Two full functional QSqlRelationalTables, problem with adding a record

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 1.3k 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.
  • F Offline
    F Offline
    friday13th
    wrote on 22 Oct 2011, 18:50 last edited by
    #1

    Hello,

    I'm writing a program for my mother which she can use to track the storage at her company.
    For this I want to make a QDialog with two relational table models. In one model are the orders from the employees, which has a relation to the employee. In the other table the products that were ordered in that exact order. The order table is fully functional,
    I can add orders and edit all the orders. The relation to the second model works too, if I select a order I get the appropriate products in the other model.

    Now I'm trying to have a button that adds a product to the product model, but I can't it too work. The interpreter tells me:
    edit: index was invalid
    edit: editing failed

    Also the new record does not show up on relational table model. When i look with a sqlite database manager the records have been added and the product_id is set to NULL as I want it.

    Hope someone can help me get this working.

    Code was too large for this forum, so you can find it here: http://pastebin.com/amQEpavB

    Thanks in advance.

    1 Reply Last reply
    0

    1/1

    22 Oct 2011, 18:50

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved