Results 1 to 3 of 3

Thread: QSqlTableModel and checkboxes with SQLite database

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QSqlTableModel and checkboxes with SQLite database

    Quote Originally Posted by ibergmark View Post
    Is there a way that I could set the Qt::ItemIsUserCheckable flag in the table model for my column to handle this more or less automatically?
    You can reimplement QAbstractItemModel::flags() to return Qt::ItemIsUserCheckable together with other flags for the checkable column. But notice that you must also handle Qt::CheckStateRole in data() and setData().
    J-P Nurmi

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

    ibergmark (23rd February 2008)

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.