Results 1 to 2 of 2

Thread: Selection in QML TreeView using QItemSelectionModel

  1. #1
    Join Date
    Jan 2010
    Posts
    95
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Selection in QML TreeView using QItemSelectionModel

    Hi All,

    I am using QML TreeView of Qt 5.6 with QAbstractItemModel to populate the data.
    I need to update the selection manually from Qt side, so I am using QItemSelectionModel which takes QAbstractItemModel as it's parent.

    I'm selecting the item using select method of the QItemSelectionModel.

    However, the shift selection of the model fails.

    Kindly advice

  2. #2
    Join Date
    Jan 2010
    Posts
    95
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Selection in QML TreeView using QItemSelectionModel

    I'm looking for selecting items using the "Shift" key, but as i have selected using the QItemselectionmodel, the signal of selectionChanged isn't fired.

    Qt Code:
    1. treeSelection_->select(Index, QItemSelectionModel::Select);
    To copy to clipboard, switch view to plain text mode 

    Kindly advice what i'm missing

Similar Threads

  1. Replies: 0
    Last Post: 29th July 2015, 08:34
  2. Selection color for progressbar in treeview
    By Jennie Bystrom in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2011, 17:32
  3. QItemSelectionModel and QTreeView
    By rrafluap in forum Qt Programming
    Replies: 0
    Last Post: 13th December 2010, 19:49
  4. Replies: 1
    Last Post: 27th October 2010, 18:06
  5. TreeView and selection updating
    By Tepi in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2010, 09:07

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.