View Full Version : Looking for a method to show several images
harakiri
17th June 2007, 23:00
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?
wysota
17th June 2007, 23:02
QDirModel+QListView+custom delegate.
harakiri
26th June 2007, 11:22
thanks to wysota i have a QListView containing all files of a chosen folder :-)
folderModel = new QDirModel;
folderModel->setFilter(QDir::Files);
folderView = new QListView();
folderView->setModel(folderModel);
/** folderView->setRootIndex(folderModel->index(folderName)); **/
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
QList<QTreeWidgetItem *> selectedItems () const
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?
wysota
26th June 2007, 11:57
QAbstractItemView::setSelectionMode
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.