[Interest] How to avoid qml engine repeatedly copying and garbage collecting qstringlists?

NIkolai Marchenko enmarantispam at gmail.com
Mon Oct 23 16:46:47 CEST 2023


> instantiate a non-singleton type declared in C++ rather than referencing
yet another singleton

How is instantiating a new c++ instance each time faster than referencing a
c++ side singleton??

On Mon, Oct 23, 2023 at 5:44 PM Ulf Hermann <ulf.hermann at qt.io> wrote:

> > So do I use `pragma Singleton` to wrap a c++ singleton into a qml one
> > declaring such a var property?
>
> That would be one way to do it. I don't know what your singleton looks
> like. Maybe it can be defined in QML and instantiate a non-singleton
> type declared in C++ rather than referencing yet another singleton. That
> would probably be faster.
>
> best regards,
> Ulf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20231023/5e429bfa/attachment-0001.htm>


More information about the Interest mailing list