Results 1 to 2 of 2

Thread: Checkable item in tree model

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 27 Times in 27 Posts

    Default Checkable item in tree model

    Hi all !
    I need to build treview with checkable items. I try use model/view approach to this. As template i use some class TreeModel(actually don't remember really caption ) from qt samples that derived from QAbstractItemModel. In virtual method Qt::ItemFlags flags(const QModelIndex &index) const i try returnt combination of needed item falgs, alike Qt::ItemIsEnabled | Qt::ItemIsUserCheckable but my item in tree still not checkable...
    Have i ask exhaustive question ?
    Pls help...

    [EDITED]
    Play with role Qt::CheckStateRole in data() ?
    Last edited by zlatko; 11th May 2007 at 11:23. Reason: extended searching :)
    a life without programming is like an empty bottle

Similar Threads

  1. using the example of simple tree model
    By krishna.bv in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2006, 12:28
  2. how to display full tree item name on mouse move ?
    By rajesh in forum Qt Programming
    Replies: 5
    Last Post: 15th November 2006, 08:41
  3. QTableWidget item checkable and combo?
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2006, 07:12
  4. Replies: 3
    Last Post: 7th May 2006, 17:07
  5. drag and drop with item views
    By castorvert in forum Qt Programming
    Replies: 14
    Last Post: 27th March 2006, 10:12

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.