Results 1 to 4 of 4

Thread: QDataWidgetMapper and QSqlQueryModel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Posts
    16
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3

    Question Re: QDataWidgetMapper and QSqlQueryModel

    Hi,

    sorry for my bad english! The submit fails not directly, mapper->submit() is true.

    The question is, how can i write back the values to my database?

    Can you help me please?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: QDataWidgetMapper and QSqlQueryModel

    Ah!

    The documentation of QSqlQueryModel says: "The model is read-only by default. To make it read-write, you must subclass it and reimplement setData() and flags()."

    Cheers,
    _

Similar Threads

  1. QDataWidgetmapper
    By locus in forum Qt Programming
    Replies: 7
    Last Post: 5th June 2012, 11:24
  2. Advise:Do I need QDataWidgetMapper?
    By fatecasino in forum Newbie
    Replies: 1
    Last Post: 4th March 2011, 01:04
  3. QDataWidgetMapper with QTreeView
    By Nightfox in forum Qt Programming
    Replies: 2
    Last Post: 1st September 2009, 19:58
  4. QDataWidgetMapper
    By rogerholmes in forum Newbie
    Replies: 4
    Last Post: 24th March 2009, 19:32
  5. QCheckBox on QDataWidgetMapper
    By Banjo in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 03:09

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.