Results 1 to 2 of 2

Thread: QListView - setCurrentIndex()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    184
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 7 Times in 6 Posts

    Default QListView - setCurrentIndex()

    Hello!

    I've got problem using 'setCurrentIndex()' slot of 'QListView'. I'd like to select specyfic row from list. Argument of 'setCurrentIndex()' is 'QModelIndex'. I can't find here any function to select specyfic row. How can I use It to select specyfic row from QListView?

    thanks in advance
    best regards
    Tomasz

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: QListView - setCurrentIndex()

    you probably need QListWidget, and not QListView.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QComboBox: setCurrentIndex() is not working?
    By Astronomy in forum Qt Programming
    Replies: 12
    Last Post: 12th August 2015, 21:51
  2. QListView
    By Maluko_Da_Tola in forum Newbie
    Replies: 3
    Last Post: 10th August 2010, 22:21
  3. Use of QListView
    By BrainStorm in forum Qt Programming
    Replies: 5
    Last Post: 3rd August 2010, 04:39
  4. QListView
    By Yayati.Ekbote in forum Qt Programming
    Replies: 2
    Last Post: 1st March 2010, 11:41
  5. setCurrentIndex() doesn't display cursor(bounding rect)
    By DIMEDROLL in forum Qt Programming
    Replies: 0
    Last Post: 5th November 2008, 06:24

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
  •  
Qt is a trademark of The Qt Company.