[Development] Fwd: Optional network capabilities in QML

Carlos Enrique Pérez Sánchez ceperez1996 at gmail.com
Thu Jun 18 01:00:16 CEST 2020

Hi Shawn,

I made a mistake and sent the last reply only to @Ulf Hermann
<ulf.hermann at qt.io> instead of sending it to the @development at qt-project.org
<development at qt-project.org> team, so this last part is not in the mailing
list, so I'm forwarding it to you.

Best, Carlos.

---------- Forwarded message ---------
De: Carlos Enrique Pérez Sánchez <ceperez1996 at gmail.com>
Date: mié., 17 jun. 2020 a las 18:45
Subject: Re: [Development] Optional network capabilities in QML
To: Ulf Hermann <ulf.hermann at qt.io>

Hi Ulf,

Sorry for not being clear, my fault. Yes, the purpose is making network
support optional in Qt Quick. Qt Network is a very heavy module. Since Qt
Quick fits for almost everything you could imagine, in about 90% of my use
cases (and I'm being very conservative) network support is not a
requirement. Making Qt Network optional can save very precious and valuable
space, and maybe speed up some things (I'm not sure about that). The
problem is that the relationship between Quick and Network modules is not
like the relationship between Quick and Svg modules, which is optional. Qt
Quick explicitly depends on Qt Network (you can check Qt5Quick.so and
Qt5Qml.so with ldd or just try to run a Qt Quick application without
Qt5Network.so). Even if that dependence is removed, Qt Quick still depends
on Qt Qml, which explicitly depends on Qt Network. So, even if you don't
need network support at all, you must ship the heavy Network module. So I
think that making Network optional in Qml is the key to solving this
problem. I'm aware that debugging QML applications requires network
support, but for releasing it should be optional.

And yes, -no-feature-qml-network (or just -no-qml-network) works as
expected. Still is not even close as useful as having optional network
capabilities in Qt Quick. You must compile Qt (which in some releases has
been a problem) for completely dropping something very useful but that you
aren't likely to need.

El mié., 17 jun. 2020 a las 4:01, Ulf Hermann (<ulf.hermann at qt.io>)

> Hi Carlos,
> > In Qt 5.15.0, I compiled QML without network support successfully, so
> > the bug was fixed and so there's no need for the issue.
> > On the other hand, you only mention the compilation error, which is not
> > the main topic here. So I want to ask you if I should open a bug report
> > about making the network support in Qt Quick applications optional
> > instead of discussing those things here with the development team.
> I don't really understand this question. What exactly is the problem you
> are observing and what is the desired outcome? -no-feature-qml-network
> should have the effect of not linking QtNetwork into QtQml. QtQuick is
> indeed a somewhat different story. I would have to research how network
> support is handled there, and I'm in favor of making it optional if it
> is not. You should talk to Shawn Rutledge, the maintainer of QtQuick,
> about that.
> Maybe you're confused about the difference between QtQml and QtQuick.
> QtQml is about QML, the language. You can write all kinds of
> applications in QML, not necessarily graphical ones. QtQuick is
> graphical toolkit, providing Item, Rectangle, Image etc, for QML. It's a
> separate library with separate dependencies.
> best,
> Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200617/d489ab30/attachment.html>

More information about the Development mailing list