Results 1 to 8 of 8

Thread: QsqlQueryModel Subclass

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: QsqlQueryModel Subclass

    The better way is make use of a custom proxy model, and not disturb the QSqlQueryModel. Moreover implementing QSqlQueryModel::setData() may not be practical as you don't know how the QSqlQueryModel stores the data internally.

    The proxy model will add the extra column.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  2. The following user says thank you to Santosh Reddy for this useful post:

    Delphi (13th May 2013)

Similar Threads

  1. Replies: 2
    Last Post: 15th April 2013, 06:33
  2. QSqlQueryModel
    By StefanLatsch in forum Qt Programming
    Replies: 1
    Last Post: 7th December 2010, 11:09
  3. Does 'QSqlQueryModel' have a bug?
    By nuntawat in forum Qt Programming
    Replies: 8
    Last Post: 6th April 2010, 17:45
  4. Replies: 8
    Last Post: 12th February 2010, 02:41
  5. QSqlQueryModel write subclass
    By skuda in forum Qt Programming
    Replies: 6
    Last Post: 29th October 2007, 16:18

Tags for this Thread

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.