PDA

View Full Version : Changing project from .qmlproject to .pro format



steel14228
16th April 2017, 17:15
I'm working on a project that I initially developed in the .qmlproject format. I have about 6 QML classes defined and dozens of images in the images folder.

I now need to more control past the graphics and will need C++ as part of the design. I started this as a QML Quick UI project with a .pro project file so I can use the C++ and QML files together.

I now need to merge the first QML files with the second phase. I thought it would be as easy as dropping in the old QML files, but it doesn't work that way.

I found that I would have to add EACH QML file individually to the project list, along with ALL the image files. Is there a simpler way to specify this without adding each like this?

And why am I doing this? The project will be done in 2 phases: the first on the PC and the second will be on linux. And it also needs to interface with Matlab for both, which is where C++ comes into play. If I go with .qmlproject I will need to write a plugin to get access to external programs I write to do the interface.

wysota
16th April 2017, 17:50
It should be as easy as adding all the files to the project. What you might be enountering though is that you execute the program from a different directory than that where your qml files reside so using relative paths for them doesn't work. In that case you might want to embed all the files in the application binary using Qt resource system.