[Interest] How to fix qml unqualified access warning for setContextProperty
Federico Ferri
federico.ferri.it at gmail.com
Thu Oct 24 12:08:23 CEST 2024
Have you considered the option of making your "controller" object a QML
Singleton? That should help with type checking.
On Thu, 24 Oct 2024 at 12:06, Nuno Santos via Interest <
interest at qt-project.org> wrote:
> Hi,
>
> In my applications I usually register a main controller for the whole
> application right at startup:
>
> QQmlApplicationEngine* engine = new QQmlApplicationEngine();
> engine->rootContext()->setContextProperty("controller", controller);
>
> However, with the most recent QtCreator I have the following warning:
> "Unqualified access”
>
> While things keep to work I believe this will be more important if I start
> using the qml compilation to c++
>
> Is there a way to make this access “qualified”?
>
> Thanks!
>
> Nuno
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20241024/b0e0a3cf/attachment.htm>
More information about the Interest
mailing list