c++ - Qt - Quick 2 App from new project (main.qml file not found) -


i didn't change in default qt creator app, should ok. created new project , tried compile , run. compile process ok, after run, main.qml not found, see black window without interface (there should hello world text).

qml1.pro

# add more folders ship application, here folder_01.source = qml/qml1 folder_01.target = qml deploymentfolders = folder_01  # additional import path used resolve qml modules in creator's code model qml_import_path =  # if application uses qt mobility libraries, uncomment following # lines , add respective components mobility variable. # config += mobility # mobility +=  # .cpp file generated project. feel free hack it. sources += main.cpp  # installation path # target.path =  # please not modify following 2 lines. required deployment. include(qtquick2applicationviewer/qtquick2applicationviewer.pri) qtcadddeployment() 

main.cpp

#include <qtgui/qguiapplication> #include "qtquick2applicationviewer.h"  int main(int argc, char *argv[]) {     qguiapplication app(argc, argv);      qtquick2applicationviewer viewer;     viewer.setmainqmlfile(qstringliteral("qml/qml1/main.qml"));     viewer.showexpanded();      return app.exec(); } 

console output after app run creator:

qml debugging enabled. use in safe environment. file:///users/krab/projects/qtprojects/build-qml1-desktop_qt_5_1_1_clang_64bit-ladění/qml1.app/contents/resources/qml/qml1/main.qml: file not found 

well can build application when qml files missing because aren't processed or anything. seems fine compiler.

but advise in directory: users/krab/projects/qtprojects/build-qml1-desktop_qt_5_1_1_clang_64bit-ladění/qml1.app/contents/resources/qml/qml1/ check if qml files located there.

also local qml file, in project directory? otherwise builder doesn't have export build directory.


Comments

Popular posts from this blog

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

html - Repeat image to extend header to fill screen -

javascript - Backbone.js getting target attribute -