Results 1 to 3 of 3

Thread: Getting indexes of selected items

  1. #1
    Join Date
    Sep 2007
    Posts
    99
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Getting indexes of selected items

    How do I get selected row indexes from my QTableView ?
    I have my QAbstrTableModel SelectionBehaviour set to SelectRows
    I thought that QAbstractItemView::selectedIndexes will return me these indexes...but I read in the docs that "The default implementation does nothing."
    Is there abt way how to do that ? Or how should I reimplement that method?
    Or does it have to be reimplemented ?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Getting indexes of selected items


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

    Default Re: Getting indexes of selected items

    Quote Originally Posted by gyre View Post
    I read in the docs that "The default implementation does nothing."
    Is there abt way how to do that ? Or how should I reimplement that method?
    Or does it have to be reimplemented ?
    No you don't have to reimplement it, it's implemented in QTableView.
    J-P Nurmi

Similar Threads

  1. qlistwidget count of selected items
    By tpf80 in forum Newbie
    Replies: 4
    Last Post: 10th December 2009, 13:31
  2. Move multi selected graphics items
    By tebessum in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 20:00
  3. Replies: 1
    Last Post: 15th March 2007, 20:45
  4. Replies: 3
    Last Post: 27th July 2006, 12:48
  5. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20

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.