Results 1 to 3 of 3

Thread: How to tell which row is selected in a QtreeView

  1. #1
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to tell which row is selected in a QtreeView

    I have a QTreeView with a subclassed QStandardModel, and I am having difficulty in determining which row(s) is(are) selected. The items are checkable, but in some cases I wish to check which items have been selected by the user so that I can let the user set them to be checked with the click of a button. I can't find out how to do this. Does anyone know how?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to tell which row is selected in a QtreeView

    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    Valheru (9th November 2007)

  4. #3
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to tell which row is selected in a QtreeView

    That did it, thanks.

Similar Threads

  1. QTreeWidget or QTreeView ?
    By vieraci in forum Qt Programming
    Replies: 3
    Last Post: 7th November 2007, 09:31
  2. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:22
  3. QTreeView: selection behavior upon selected item removal
    By Pieter from Belgium in forum Qt Programming
    Replies: 6
    Last Post: 11th July 2007, 16:00
  4. Replies: 1
    Last Post: 15th March 2007, 20:45
  5. Removing the selected row in a QTreeView
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2006, 11:21

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.