[Qt-creator] QML dir hierarchy
Jason H
jhihn at gmx.com
Thu Jan 5 16:44:12 CET 2017
Ah, ok, so it is possible in filesystem folders, but not possible for groupings of qresource elements with prefix="" attributes within a QRC.
> Sent: Thursday, January 05, 2017 at 6:32 AM
> From: "Tobias Hunger" <Tobias.Hunger at qt.io>
> To: "qt-creator at qt-project.org" <qt-creator at qt-project.org>
> Subject: Re: [Qt-creator] QML dir hierarchy
>
> Hi Jason,
>
> In Creator I see the qrc files with subfolders. I guess that is because we have
> them in subfolders on the file system (see attached screenshot).
>
> This is how the qrc file looks like:
>
> <RCC>
> <qresource prefix="/qmakeprojectmanager">
> <file>QmakeProjectManager.mimetypes.xml</file>
> <file>images/dark_unknown.png</file>
> </qresource>
> </RCC>
>
> Best Regards,
> Tobias
>
> On Wed, 2017-01-04 at 16:43 +0100, Jason H wrote:
> > I am cross posting this to QtC and Interest because it's a combinational
> > issue.
> >
> > My QML projects are getting sizable, I'd like to start breaking my QML
> > resources down in a hierarchy, but my attempt at that has failed.
> > Given:
> >
> > qml.qrc /
> > - app.js
> > - Screen1.qml
> > - Component1.qml
> > - Screen1.qml
> > - Component3.qml
> > - Component4.qml
> > - Screen1.qml
> > - Component2.qml
> >
> > I'd like to break it down into:
> > qml.qrc /
> > - Screens /
> > -- Screen1.qml
> > -- Screen1.qml
> > -- Screen1.qml
> > - Components /
> > -- Comoponent1.qml
> > -- Comoponent2.qml
> >
> > But I was not able to accomplish this in QtC. So I hacked the QRC file to have
> > two prefix entries: <qresource prefix="/screens"> and <qresource
> > prefix="/components"> However this resulted in errors.
> >
> > Also, in QtC they weren't folderized, they just appeared as
> > screens/Screen1.qml
> > ...
> > components/Component1.qml
> > ...
> >
> > How can I accomplish a folderized QRC? Currently, the filesystem is flat, but
> > I don't mind adding them to actual folders if that would help.
> > _______________________________________________
> > Qt-creator mailing list
> > Qt-creator at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qt-creator
>
> --
> Tobias Hunger, Senior Software Engineer | The Qt Company
> The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
> Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B_______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
More information about the Qt-creator
mailing list