QML C++ application crash outside Qt Creator -


i using qt 5.1.1 visual studio 2012 compiler. have quick 2 application c++ backend. when i'm running application in qt creator looks good. when i'm trying launch application outside qt creator crashes.

i have qt*.dll 's in folder, have d3dcompiler_46.dll.

i tried access filed in qml file c++ part, , see after crash in visual studio debugger crash null pointer exception.

qobject *openbutton = instanceroot->findchild<qobject*>("openfilebutton"); openbutton->setproperty("enabled",qvariant(enabled)); 

i have resources declared in qrc file, , included in .pro file

resources += res.qrc 

by this article menas, qml files should emdeded in exe files. think shouldn't.

how can find , fix problem?

upd: here main function:

int main(int argc, char *argv[]) {      qguiapplication a(argc, argv);     q_init_resource(res);     qquickview view;     decrypter dec;      view.rootcontext()->setcontextproperty("decrypter", &dec);     qobject::connect(view.engine(), signal(quit()), &a, slot(quit()));     view.setsource(qurl("qrc:/playergui.qml"));     view.show();       qquickitem *rootobject = view.rootobject();     player *player = new player(rootobject);      return a.exec(); } 

upd2: 2 persons comments confused 1 string of code:

view.engine()->addimportpath("../qtav/qml/"); 

so, deleted it, , still have crash(


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -