I could not find an answer already posted for this situation in this forum (possibly because the answer is that this is really easy to do and should have been obvious). I am wondering if someone can help me get this cleared up.
I am trying to fill a combo box (libraryList) with the names of all folders under "Top/Subject/Items". It seems like the code below should work, but libraryList remains empty. Is there something that I am missing?
File directory("/Top/Subject/Items"); DirectoryIterator iter(directory, true, "*.*", File::findDirectories); int iterCount = 0; while (iter.next() == true) { iterCount++; if(iter.getFile().isDirectory() == true) { libraryList->addItem(iter.getFile().getFileName(), iterCount); } }
Thank you very much!
mkd