QML to .exe
I am trying to move from my simple QML files to a windows .exe that I can pass on to management for review. I installed the Visual Studio add-in but it looks like it wants to open a .pro file. All I have is .qml and .qmlproject. Could someone point me in the right direction of what needs done?
something like (not tested, just coded here in reply form)
- int main (int argc, char **argv)
- QApplication app(argc,argv);
- QDeclarativeView view("/path/to/your/Example.qml");
- view.resize(500,500); //this and prev lines are needed only if you don't have sizes in root element of your qml
- return app.exec();
Save code I wrote you before as main.cpp and run in folder with it
- qmake -project
It will create a .pro file. Open it and find QT var. I think it will contain only
- QT += core gui
- QT += core gui declarative
After it run qmake in this folder with name of .pro file as argument. And after it run make (or nmake, if you are using msvc compiler).