c++ - How to set application path? -


i wrote console qt application. i'd copy file directory, exe file.

m_path = qcoreapplication::applicationdirpath() + "\\g.aux.xml"; qfile::copy(m_path,pathnew); 

this code excellent works, when debug application. when copy .exe file directory not work.

please tell me, how fix it.

upd: think found answer need use qdir::currentpath()

get current working directory in qt application

you're missing .dll files.

copying .exe file not enough qt applications - must make sure necessary dynamic libraries in same directory .exe. in case, copying qtcore4.dll or qt5core.dll compiler's directory should do, you'll want read this page more details in future.

also, in future, please describe problem more detail.


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

tsql - Pivot with Temp Table (definition for column must include data type) -- SQL Server 2008 -