Results 1 to 2 of 2

Thread: Problem with using QSortFilterProxyModel() with QTreeWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2021
    Posts
    27
    Thanks
    5

    Default Problem with using QSortFilterProxyModel() with QTreeWidget

    Currently, there is a problem with line number 5, QT doesn't allow to change the QTreeWidget model.

    Is there a view to fixing this problem? instead of using QtreeView.

    Qt Code:
    1. QAbstractItemModel * sourceModel;
    2. sourceModel = ui->treeWidget->model();
    3. proxyModel->setSourceModel(sourceModel);
    4. ui->treeWidget->QTreeWidget::setModel(proxyModel);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with using QSortFilterProxyModel() with QTreeWidget


Similar Threads

  1. Replies: 2
    Last Post: 12th May 2013, 16:49
  2. Problem with QSortFilterProxyModel
    By pcheng in forum Newbie
    Replies: 1
    Last Post: 18th June 2012, 17:39
  3. how to use QSortFilterProxyModel with QtreeWidget?
    By patcito in forum Qt Programming
    Replies: 4
    Last Post: 13th July 2011, 14:43
  4. Problem QSortFilterProxyModel
    By estanisgeyer in forum Qt Programming
    Replies: 3
    Last Post: 15th June 2009, 19:51
  5. QSortFilterProxyModel problem
    By blukske in forum Qt Programming
    Replies: 8
    Last Post: 22nd June 2006, 09:26

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.