Results 1 to 7 of 7

Thread: QPersistentModelIndex and QDataWidgetMapper

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    39
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPersistentModelIndex and QDataWidgetMapper

    OK thanks.

    I am using a QSqlRelationalTableModel and a QDataWidgetMapper. What is the best way to manage transactions?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPersistentModelIndex and QDataWidgetMapper

    Your model is a subclass of QSqlTableModel that has a QSqlTableModel::database() member which gives you access to the database that in turn has methods called QSqlDatabase::transaction(), QSqlDatabase::rollback() and QSqlDatabase::commit().

  3. #3
    Join Date
    Jan 2008
    Posts
    39
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPersistentModelIndex and QDataWidgetMapper

    Thanks again for that.

Similar Threads

  1. QDataWidgetmapper
    By locus in forum Qt Programming
    Replies: 7
    Last Post: 5th June 2012, 11:24
  2. QCheckBox on QDataWidgetMapper
    By Banjo in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 03:09
  3. QDataWidgetMapper and QSqlRelationalTableModel problem
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 15:46
  4. QDataWidgetMapper question
    By larry104 in forum Qt Programming
    Replies: 3
    Last Post: 26th July 2007, 15:30
  5. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.