LarryERamey
18th April 2011, 20:35
Is there a way to change the current directory to something in the resource directory? for example:
QDir dir(":/resources/html");
dir.setFilter(QDir::Files | QDir::NoSymLinks);
dir.setSorting(QDir::Name);
QFileInfoList list = dir.entryInfoList();
Q_ASSERT(QDir::setCurrent(":/resources/html"));
I nthe above example, list has exactly the files in It I think it should, but the program keeps quitting because the setCurrent call is returning false.
Can I simply not do what I am trying to do here?
QDir dir(":/resources/html");
dir.setFilter(QDir::Files | QDir::NoSymLinks);
dir.setSorting(QDir::Name);
QFileInfoList list = dir.entryInfoList();
Q_ASSERT(QDir::setCurrent(":/resources/html"));
I nthe above example, list has exactly the files in It I think it should, but the program keeps quitting because the setCurrent call is returning false.
Can I simply not do what I am trying to do here?