← Back to team overview

ubuntu-phone team mailing list archive

Re: Autoupdating QML files stored in resource

 

Yeah... I agree that in the long run most likely you'll be better off not using 
a qrc file for QML. However, if you really need to do so, here's a quick hack 
on how to make it build every time:

In QtCreator open "Projects" and select the "Build" tab. Use "Add build step" 
to create a new "Custom process step". Make sure to move it up *before* the 
regular make step. In the command field write "touch" and into the arguments 
field write the path to your qrc file.

That will "touch" your qrc file every time you build the project and  it'll be 
rebuilt every time.

Hope this helps,
Michael

On Friday 26 April 2013 09:25:26 mrqtros@xxxxxxxxx wrote:
> Storing qml files in qrc is bad practice. I can't give link because I have
> limited internet access. But trust me =)
> 
> 
> 26.04.13 13:06 Alberto Mardegan написал(а):
> 
> On 04/26/2013 11:59 AM, Николай Шатохин wrote:
> > Hello.
> > 
> > I store my qml files in qrc. But I have problem with it. When I edit
> > some file it will not update in resource until I edit and save this
> > resource. Is it possible to autoupdate it at every project build?
> 
> Whenever you create a new QML file, you need to re-run "qmake". It's a
> known bug [0].
> However, this is only a problem when a file is first added; if you then
> modify the same file and run "make", it should rebuild the resource file
> when your QML file changes.
> 
> 
> Ciao,
> Alberto
> 
> [0] https://bugreports.qt-project.org/browse/QTCREATORBUG-1627


Follow ups

References