Results 1 to 3 of 3

Thread: how to get first selected item in selection area

  1. #1
    Join Date
    May 2010
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to get first selected item in selection area

    I use QListWidget and I set ContiguousSelection,
    I want to get index of first selected item in selection area. There is some easy way to do it?
    p.s. QListWidget::currentRow, QListWidget::selectedItems, QListWidget::selectedItems are not suitable

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: how to get first selected item in selection area

    Why isn't selectedItems not suitable?

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to get first selected item in selection area

    You can get selectedItems().at(0) .. can't you ?

    also if your definition of having first selected item is different, define what you want.

Similar Threads

  1. How to copy selected ellipse area from image
    By adamsakli in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2009, 19:54
  2. Selection area on image
    By sdwdd in forum Newbie
    Replies: 2
    Last Post: 5th March 2009, 11:09
  3. Increasing the selection area for a qgraphicsPathitem
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 17th August 2007, 23:03
  4. QTreeView: selection behavior upon selected item removal
    By Pieter from Belgium in forum Qt Programming
    Replies: 6
    Last Post: 11th July 2007, 16:00
  5. Replies: 14
    Last Post: 9th November 2006, 08:35

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.