Results 1 to 13 of 13

Thread: How to make QAbstractItemModel 's data checkable

Threaded View

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

    Default Re: How to make QAbstractItemModel 's data checkable

    Quote Originally Posted by nifei View Post
    Qt Code:
    1. void QStandardItem::setFlags(Qt::ItemFlags flags)
    2. {
    3. setData((int)flags, Qt::UserRole - 1);
    4. }
    To copy to clipboard, switch view to plain text mode 

    got it, thanks a lot.
    btw, you can use void QStandardItem::setCheckable ( bool checkable ) insted of setting flags in that case if you use QStandardItem.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

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

    nifei (4th February 2009)

Similar Threads

  1. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 23:46
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 06:57
  3. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 13:53

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.