Results 1 to 4 of 4

Thread: Looking for a method to show several images

  1. #1
    Join Date
    May 2007
    Posts
    33
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Looking for a method to show several images

    hi,

    i want to have an image-view for all pictures in a selected folder. the best would be a thumbnail for every image that can be selected/deselected. is there a view or widget that is useful for this? i haven't found it in the documentation or the internet. anyone has an idea?

  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: Looking for a method to show several images

    QDirModel+QListView+custom delegate.

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

    harakiri (26th June 2007)

  4. #3
    Join Date
    May 2007
    Posts
    33
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Looking for a method to show several images

    thanks to wysota i have a QListView containing all files of a chosen folder :-)
    Qt Code:
    1. folderModel = new QDirModel;
    2. folderModel->setFilter(QDir::Files);
    3. folderView = new QListView();
    4. folderView->setModel(folderModel);
    5.  
    6. /** folderView->setRootIndex(folderModel->index(folderName)); **/
    To copy to clipboard, switch view to plain text mode 

    now i want to select several of these files at once (one clicks select(marks) a file, another click on the same file delects it?) and get them into a list with
    Qt Code:
    1. QList<QTreeWidgetItem *> selectedItems () const
    To copy to clipboard, switch view to plain text mode 
    But how can i enable a selection of multiple items for my listview?
    will QItemSelectionModel be an option and if yes, how can i use it to my view?

  5. #4
    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: Looking for a method to show several images


Similar Threads

  1. Replies: 4
    Last Post: 10th March 2007, 19:01
  2. JPEG Images not shown in QiconView using QT3??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 21:34

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.