Results 1 to 2 of 2

Thread: How to keep selected item in QTreeView

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to keep selected item in QTreeView

    I have a dialog with QTreeView and a button. When I click the button TreeView looses the focus. How can I tell to the view or a model that it should keep selection?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to keep selected item in QTreeView

    Are you sure, tree view loses selection. Well it will lose only focus, selection is still maintained.

Similar Threads

  1. Replies: 2
    Last Post: 17th February 2011, 03:55
  2. height property not adjusted when QTreeView item selected
    By hubbobubbo in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2010, 16:38
  3. Replies: 1
    Last Post: 20th January 2010, 09:38
  4. Changing selected QTreeView item font
    By dima1000 in forum Newbie
    Replies: 5
    Last Post: 8th October 2009, 10:28
  5. QTreeView: selection behavior upon selected item removal
    By Pieter from Belgium in forum Qt Programming
    Replies: 6
    Last Post: 11th July 2007, 17:00

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.