Results 1 to 9 of 9

Thread: Treeview and custom model

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    301
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    46
    Thanked 3 Times in 3 Posts

    Default Re: Treeview and custom model

    Hi JPN,

    Don't think the data is flat, well, not 2d, as the first column will show message nodes with their corresponding signal nodes. Unless I'm mistaken, QAbstractTableModel doesn't allow this?

    Please see attachment of what I'm trying to do.

    Regards,
    Steve
    Attached Files Attached Files

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

    Default Re: Treeview and custom model

    Quote Originally Posted by steg90 View Post
    Don't think the data is flat, well, not 2d, as the first column will show message nodes with their corresponding signal nodes. Unless I'm mistaken, QAbstractTableModel doesn't allow this?

    Please see attachment of what I'm trying to do.
    Yes, you're right. The model needs to handle parent-child relationships. Well, good luck with implementing a tree model then! Model Test might be handy for checking out the most common mistakes.
    J-P Nurmi

  3. #3
    Join Date
    May 2007
    Posts
    301
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    46
    Thanked 3 Times in 3 Posts

    Default Re: Treeview and custom model

    Thanks JPN,

    I've decided to go for the table model as I don't really need to display the message name and data as the messages are chosen from a previous dialog, this will be the easier option for me as I'm totally confused about the modelIndex and the internalPointer() function?!

    Kind regards,
    Steve

Similar Threads

  1. TreeView custom model
    By steg90 in forum Newbie
    Replies: 1
    Last Post: 9th May 2007, 10:06

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.