0

I think Qt must have this, because QtCreator has a list on its sidebar:

enter image description here

Ideally I am just looking for a Qt function that will just return this list.

Thanks.

  • I suspect you'll be better off telling us what you're actually trying to do. You won't be shipping your sources to your users, so there's no call to list the project's files in your program. Are you trying to build a Qt Creator plugin? Are you trying to list files in an arbitrary directory? (I suspect that Qt Creator has custom code to parse your qmake or cmake files and figure out which files to show.) – Robert Schroll Nov 29 '14 at 18:28
  • @RobertSchroll Yes; this is for a qtcreator plugin. In short; I am looking for a way to locate a folder in a project called "tests". From that; I want to create a UI that will run tests from QtCreator. – Akiva Nov 29 '14 at 21:21
1

You can list the files in a given directory with QDir::entryList(). QDir has a number of other methods that may be useful for you as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.