c++ - setWorkingDirectory only works for Qt Creator -


i creating app run specific .bat file. function should execute .bat file within same directory .exe file.

the following code works inside qtcreator, not outside (when running exe file, complains non-existence of .bat file).

how can fix this?

qprocess *process = new qprocess( ); process->setworkingdirectory(qapp->applicationdirpath()); process->execute(qapp->applicationdirpath()+"\\getlist.bat"); qdebug() << "app path : " << qapp->applicationdirpath(); 


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -