Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. After inserting a row via QSqlRelationalTableModel how do we find the last insert id (primary key value)?

After inserting a row via QSqlRelationalTableModel how do we find the last insert id (primary key value)?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 107 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.
  • J Offline
    J Offline
    jdent
    wrote on last edited by
    #1

    maybe like this?

    model->query().lastInsertId();
    
    J 1 Reply Last reply
    0
    • J jdent

      maybe like this?

      model->query().lastInsertId();
      
      J Offline
      J Offline
      jdent
      wrote on last edited by
      #2

      @jdent I am pretty sure this is it!!

      1 Reply Last reply
      0
      • J jdent has marked this topic as solved on

      • Login

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