Results 1 to 2 of 2

Thread: QTreeView Multiline selection using Ctrl and mouse click

  1. #1
    Join Date
    Dec 2016
    Posts
    37
    Qt products
    Qt5
    Platforms
    Windows

    Default QTreeView Multiline selection using Ctrl and mouse click

    I've got a QTreView with multiple rows in it.
    I'd like to select a few random rows by holding down the Ctrl key and clicking on each desired row.
    By default, every single row from the current row to the last clicked on row gets highlighted.
    How do I change this behavior?

    Thanks.

    t

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTreeView Multiline selection using Ctrl and mouse click

    Hi, this should be controlled by the Selection Mode: http://doc.qt.io/qt-5/qabstractitemv...ctionMode-enum

    Ginsengelf

Similar Threads

  1. QTreeWidget - no selection with mouse right click
    By kmilo9999 in forum Qt Programming
    Replies: 2
    Last Post: 19th June 2017, 17:17
  2. Replies: 5
    Last Post: 15th February 2016, 21:30
  3. Replies: 5
    Last Post: 18th August 2014, 07:00
  4. Replies: 8
    Last Post: 2nd September 2010, 16:49
  5. QTreeView | disable multiline,wrapping
    By fleabite in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2007, 12:05

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.