Results 1 to 2 of 2

Thread: QTreeView and QAbstractItem Model.

  1. #1

    Unhappy QTreeView and QAbstractItem Model.

    Hi,
    I'm doubleclicking on a QTreeView and getting a QModelIndex as a paramater. using the SIGNAL() DoubleClicked(QModelIndex),

    How can I use this QModelIndex to retreive the correct TreeItem from my model (it's an n-ary tree).

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTreeView and QAbstractItem Model.

    You can use QModelIndex::data .
    Also QModelIndex::internalPointer , refer Qt Demo examples, Simple DOM Model

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.