Results 1 to 3 of 3

Thread: QTreeWidget::setModel() - Changing the model of the QTreeWidget is not allowed.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 2 Times in 1 Post

    Default Re: QTreeWidget::setModel() - Changing the model of the QTreeWidget is not allowed.

    I don't think you can setModel() on a QTreeWidget, but you can on a QTreeView.

    There are 2 ways to use a treeview / listview etc. With the 'simple' QTreeWidget / QListWidget who have their own inner model, or through the model / view classes like for instance QTreeView / QDirModel or other models.

    So just use QTreeView in stead of QTreeWidget and you're set.

  2. #2
    Join Date
    Mar 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: QTreeWidget::setModel() - Changing the model of the QTreeWidget is not allowed.

    Thanks. I will correct it and retry.

    I thought this was due to my typograhpic error. However it compilied without any warning.

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.