Results 1 to 5 of 5

Thread: listWidget select item, return index?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2012
    Posts
    13
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default listWidget select item, return index?

    Need right way to recieve item index when changed to another item

    need use currentRowChanged ? How?

    i have

    Qt Code:
    1. void View::unzipdone(QString namepath)
    2. {
    3. QDir dir(namepath);
    4. uint i = 1;
    5. QStringList filters;
    6.  
    7. filters << "*.jpg" << "*.png" << "*.bmp";
    8. dir.setNameFilters(filters);
    9.  
    10. foreach (QFileInfo mitm, dir.entryInfoList())
    11. {
    12. ui->listWidget->addItem("picture "+QString::number(i));
    13. i++;
    14. }
    15. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by noborder; 7th January 2013 at 13:19.

Similar Threads

  1. Sort Qlist and return index
    By enricong in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2012, 15:19
  2. ListWidget -> custom Item -> height
    By Archa4 in forum Newbie
    Replies: 5
    Last Post: 4th February 2011, 12:36
  3. ListWidget item's height
    By BalaQT in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2010, 14:51
  4. ListWidget positions item
    By talex in forum Qt Programming
    Replies: 3
    Last Post: 21st October 2008, 16:16
  5. ListWidget select style
    By CopyrightPhilly in forum Qt Programming
    Replies: 1
    Last Post: 9th November 2007, 09:45

Tags for this Thread

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.