Results 1 to 3 of 3

Thread: QModelIndex question

  1. #1
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QModelIndex question

    Could someone please explain this to me?

    QModelIndex QSqlQueryModel::indexInQuery ( const QModelIndex & item ) const [protected]

    Returns the index of the value in the database result set for the given item in the model.

    What is meant by & item ???
    It's obviously not a database field value, as that is not compiling.

    And what is the relationship between the record data in the model and the model index?
    What if the user changes the record sort order. What then?
    Last edited by waynew; 10th February 2010 at 00:33.

  2. #2
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    81
    Thanks
    6
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QModelIndex question

    read the follow link, contain the base of the model view programming
    http://doc.trolltech.com/4.4/model-v...ogramming.html

    QtSql is building on top of this model view framework
    http://doc.trolltech.com/4.4/qtsql.html

  3. The following user says thank you to ecanela for this useful post:

    waynew (10th February 2010)

  4. #3
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QModelIndex question

    Thanks I'll check it out.

Similar Threads

  1. getting data & QModelIndex
    By alexandernst in forum Newbie
    Replies: 3
    Last Post: 6th August 2009, 19:43
  2. QModelIndex::parent question
    By QPlace in forum Qt Programming
    Replies: 4
    Last Post: 26th June 2009, 12:26
  3. Problem with QModelIndex
    By Kesy in forum Qt Programming
    Replies: 6
    Last Post: 30th October 2008, 08:44
  4. QModelIndex problem!
    By landonmkelsey in forum Qt Programming
    Replies: 10
    Last Post: 28th August 2008, 19:46
  5. Replies: 3
    Last Post: 7th May 2006, 17:07

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.