Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QDirIterator path("/home/max/Qt/Converter-build-desktop/img");
- QMap <QString, QPixmap> map;
- QMap <QString, QPixmap>::iterator it;
- while(path.hasNext()) // get names of files and make the map
- {
- if(path.fileInfo().isFile())
- {
- map[path.fileName()] = QPixmap(path.next());
- }
- }
- for(QMap<QString, QPixmap>::iterator it = map.begin(); it != map.end(); ++it) // fill comboboxes
- {
- fromCombo->addItem(it.key());
- toCombo->addItem(it.key());
- }
Add Comment
Please, Sign In to add comment