Results 1 to 2 of 2

Thread: QSqlQueryModel + user defined roles

  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default QSqlQueryModel + user defined roles

    Hi,

    how can I set user defined roles for columns of a QSqlQueryModel?
    For example: Column 1 and 2 should have Qt:isplayRole, and column 3 and 4 should have Qt::UserRole where the values are?

    Thanks in advance

    Best Regards
    NoRulez

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSqlQueryModel + user defined roles

    did you try to use QAbstractItemModel::setData?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Resizing user defined QGraphicsItem
    By manti_madhu in forum Qt Programming
    Replies: 0
    Last Post: 9th September 2009, 09:35
  2. Using User Defined Libraries
    By csvivek in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2008, 19:47
  3. User Defined Signal?
    By rajeshs in forum Newbie
    Replies: 2
    Last Post: 18th December 2007, 11:42
  4. How to suppress user defined events in processEvents()
    By Artschi in forum Qt Programming
    Replies: 5
    Last Post: 5th July 2007, 10:17
  5. Replies: 4
    Last Post: 26th June 2007, 19:19

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.