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
Post a Comment