Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // filling combobox
- 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
- {
- QFileInfo pathInfo( path.next() );
- map[pathInfo.fileName()] = QPixmap(path.next());
- }
- for(QMap<QString, QPixmap>::iterator it = map.begin(); it != map.end(); ++it)
- {
- fromCombo->addItem(it.key());
- }
Add Comment
Please, Sign In to add comment