Don't you think the qt libs are a little too big?

697 views
Skip to first unread message

Morr. Liang

unread,
Mar 10, 2011, 10:42:53 PM3/10/11
to android-qt
I just checked the release version of the qt libs, QtCore is 2M, QtGui
is 5.5M. So if I create an app which takes 3M, well, I have to deploy
10M files to the user's cellphone. I consider that's not acceptable.

Well, you may say that the libs are shared among every Qt Apps. But in
an Android phone, I don't really expect people would have many Qt
Apps. So if a user ever installed 2 Qt Apps, the 7.5M is still a huge
overhead, not to mention the other libs.

In a country with low bandwidth like China, don't think about the user
would install your app if you ask him to download 10MB files before
the installation.

So, do you guys considering cutting down the size of qt by removing as
many things as possible ?

Ross Bencina

unread,
Mar 10, 2011, 11:14:16 PM3/10/11
to andro...@googlegroups.com
Morr. Liang wrote:
>I just checked the release version of the qt libs, QtCore is 2M, QtGui
> is 5.5M. So if I create an app which takes 3M, well, I have to deploy
> 10M files to the user's cellphone. I consider that's not acceptable.

Those lib sizes are smaller that what I get on Windows (2.1M, 8M).

Perhaps they can be put on a diet.. but with Qt you have to accept that the
runtime is not small. That's why we have Ministro


> Well, you may say that the libs are shared among every Qt Apps. But in
> an Android phone, I don't really expect people would have many Qt
> Apps. So if a user ever installed 2 Qt Apps, the 7.5M is still a huge
> overhead, not to mention the other libs.

For me I don't care.. storage on new phones/tablets is bigger and my app
binary (without libs) will probably be 5M (this is a real desktop app ported
for tablets). I think the conclusion for you should be:

If you can use Java for your app, don't use Qt.


> In a country with low bandwidth like China, don't think about the user
> would install your app if you ask him to download 10MB files before
> the installation.
>
> So, do you guys considering cutting down the size of qt by removing as
> many things as possible ?

I'm not sure what can be removed? Perhaps non-Android QStyle subclasses and
resources are still in there?

Ross.

Morr. Liang

unread,
Mar 11, 2011, 12:37:32 AM3/11/11
to andro...@googlegroups.com
Code bloat in Qt is really a headache for me.

2011/3/11 Ross Bencina <ro...@audiomulch.com>

Martin Koller

unread,
Mar 11, 2011, 1:41:15 AM3/11/11
to andro...@googlegroups.com
On Friday, 11. March 2011 06:37:32 Morr. Liang wrote:
> Code bloat in Qt is really a headache for me.

compile Qt on your own and disable all stuff you do not need:
http://doc.qt.nokia.com/4.7/fine-tuning-features.html

--
Best regards/Schöne Grüße

Martin
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at

signature.asc

Alessandro Portale

unread,
Mar 11, 2011, 3:38:41 AM3/11/11
to android-qt
On 11 Mrz., 05:14, "Ross Bencina" <ro...@audiomulch.com> wrote:
> I'm not sure what can be removed? Perhaps non-Android QStyle subclasses and
> resources are still in there?

That's a very good point to start the diet. Just the fallback icons of
the styles occupy a few hundred KB. All icons exist in 16/32/128 pixel
sizes, and there many desktop related icons like CD-ROM. That's why
wince and symbian have a reduced icon set, with less size variants:
http://qt.gitorious.org/~taipan/qt/android-lighthouse/blobs/android-stable/src/gui/styles/styles.pri#line26

Android-qt could imho reuse qstyle_s60.qrc which just includes the 32-
pixel versions of mobile relevant icons:
http://qt.gitorious.org/~taipan/qt/android-lighthouse/blobs/android-stable/src/gui/styles/qstyle_s60.qrc
...on Symbian that shaped away about ~250 KB from QtGui.

Alessandro

Morr. Liang

unread,
Mar 11, 2011, 5:45:50 AM3/11/11
to andro...@googlegroups.com
I don't see why we should even keep the 32px icons. Nowadays, UI is becoming more and more important and fallback icons just don't make good UIs...

2011/3/11 Alessandro Portale <alessandr...@googlemail.com>

Alessandro Portale

unread,
Mar 11, 2011, 12:28:46 PM3/11/11
to android-qt
Yes, these fallback icons cover the corner case of a corner case. The
fallback icons are (only) needed to support the complete Qt API on all
platforms even if the underlying platform does not provide native
icons.
Qt's cross-platform promise: An application that uses icons on
platform A should be able to function on platform B.

Many ports of Qt (even the Symbian port in part) get the native icons
from the system. If the system does not have a specific Icon, the
fallback icon is used.

Now the question is if Android has an API to provide such icons. And
can the QAndroidStyle access that Api? And which icons from this list
http://doc.qt.nokia.com/latest/qstyle.html#StandardPixmap-enum are not
supported by Android and need a fallback? Perhaps, it is possible to
reduce the fallback icons even more than on Symbian and still keep
Qt's cross platform promise.

On 11 Mrz., 11:45, "Morr. Liang" <liangm...@gmail.com> wrote:
> I don't see why we should even keep the 32px icons. Nowadays, UI is becoming
> more and more important and fallback icons just don't make good UIs...
>
> 2011/3/11 Alessandro Portale <alessandro.port...@googlemail.com>
>
> > On 11 Mrz., 05:14, "Ross Bencina" <ro...@audiomulch.com> wrote:
> > > I'm not sure what can be removed? Perhaps non-Android QStyle subclasses
> > and
> > > resources are still in there?
>
> > That's a very good point to start the diet. Just the fallback icons of
> > the styles occupy a few hundred KB. All icons exist in 16/32/128 pixel
> > sizes, and there many desktop related icons like CD-ROM. That's why
> > wince and symbian have a reduced icon set, with less size variants:
>
> >http://qt.gitorious.org/~taipan/qt/android-lighthouse/blobs/android-s...
>
> > Android-qt could imho reuse qstyle_s60.qrc which just includes the 32-
> > pixel versions of mobile relevant icons:
>
> >http://qt.gitorious.org/~taipan/qt/android-lighthouse/blobs/android-s...

Morr. Liang

unread,
Mar 11, 2011, 10:51:56 PM3/11/11
to andro...@googlegroups.com
You guys really want to make porting Qt App to any platform as easy as recompiling the project. Well, developers will get benefit from this, because they  don't have to change a line of code to make it cross-platform. But this won't do any good to the product itself. Because I think if you ever want to make a great app for a platform, you have to do some platform specific coding.

For example, if you already created a desktop version of an application. And want to make it work on cellphones. You eventually have to change the code. Because at least in cellphone, you don't have a big screen like PC.

2011/3/12 Alessandro Portale <alessandr...@googlemail.com>

Joel Dillon

unread,
Mar 12, 2011, 10:28:01 PM3/12/11
to andro...@googlegroups.com

You might want to investigate qt embedded's qconfig.h which let's you strip out features...but really, Qt is big. It's just how it is if you want to share it between apps.

On Mar 10, 2011 11:14 PM, "Ross Bencina" <ro...@audiomulch.com> wrote:

Morr. Liang wrote:
>
> I just checked the release version of the qt libs, QtCore is 2M, QtGui

> is 5...

Those lib sizes are smaller that what I get on Windows (2.1M, 8M).

Perhaps they can be put on a diet.. but with Qt you have to accept that the runtime is not small. That's why we have Ministro




> Well, you may say that the libs are shared among every Qt Apps. But in

> an Android phone, I do...

For me I don't care.. storage on new phones/tablets is bigger and my app binary (without libs) will probably be 5M (this is a real desktop app ported for tablets). I think the conclusion for you should be:

If you can use Java for your app, don't use Qt.




> In a country with low bandwidth like China, don't think about the user

> would install your app...

Alessandro Portale

unread,
Mar 13, 2011, 6:49:18 AM3/13/11
to android-qt
On 11 Mrz., 18:28, Alessandro Portale
<alessandro.port...@googlemail.com> wrote:
> Now the question is if Android has an API to provide such icons. And
> can the QAndroidStyle access that Api? And which icons from this listhttp://doc.qt.nokia.com/latest/qstyle.html#StandardPixmap-enumare not
> supported by Android and need a fallback? Perhaps, it is possible to
> reduce the fallback icons even more than on Symbian and still keep
> Qt's cross platform promise.

Here is what I coincidently stubled upon. Android provides many of the
needed icons via "Drawables":
http://androiddrawableexplorer.appspot.com/
And there are also the theme bits which can be used by QAndroidStyle
to make QWidgets (or even the "native aware" QML components
http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/ ?)
look native.
Reply all
Reply to author
Forward
0 new messages