[Qt-interest] Reducing Qt footprint when using plugins

Scott Aron Bloom Scott.Bloom at sabgroup.com
Thu Jul 9 18:21:47 CEST 2009


I get what you are trying to do...  I had a similar problem a while
back...

 

Here is what I would recommend...  using the the -D QT_NO_<FEATURE> wrap
the code necessary inside QT Designer with the proper defines do QT
doesn't know about that widget...

 

The problem you are going to hit, there are many widgets used to run
Designer itself... For instance, say you don't need QToolButton, and
your dynamic .ui files don't need it either... Designer itself does, so
you may not be able to get rid of it in your QT at all.

 

One thing you might want to consider... How are these .ui files being
created?  If they are truly as trivial as they sound, you may be able to
write your own XML -> QWidget layout mechanism without much difficulty. 

 

And this way, you can also notify the user when a bad xml file is being
read in, that used a widget type you don't support.

 

Scott

 

 

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Christopher
Boger
Sent: Thursday, July 09, 2009 9:17 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Reducing Qt footprint when using plugins

 

Yeah that's what I was afraid of. I think the current implementation
forces you to include pretty much all gui elements if you use plugins,
even if you're doing a very simple plugin. (I was able to prune out some
non-gui stuff.) I don't see why one couldn't go through the code and
remove some of the larger unneeded stuff, which is what I might have to
do.  It would also be nice to know the approximate code sizes associated
with all the Qt features, so I can focus on the big ones.

 

Note that I'm not trying to run Designer in my app, only support a
simple custom widget plugin. 

 

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Scott Aron Bloom
Sent: Thursday, July 09, 2009 8:31 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Reducing Qt footprint when using plugins

 

Since Designer has to have the ability to display much of the GUI
library, I don't see any way you are going to be able to reduce the QT
footprint...

 

Scott

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Christopher
Boger
Sent: Thursday, July 09, 2009 7:26 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Reducing Qt footprint when using plugins

 

I am trying to reduce Qt's footprint for my embedded targets (linux and
CE). I've tried using the QConfig tool and alternatively simply removing
features with "-D QT_NO_<FEATURE>" method to prune out stuff I don't
use. This works pretty well for all the "standard" libraries (QtCore,
QtGui, QtNetwork, QtScript, QtXml). But, my app uses designer plugins so
I need to also build the QtDesigner library, which doesn't seem to play
nice with feature removal.

 

What I've discovered is that when using QConfig, it will by default
simply not build the tools, including the QtDesigner library. Using the
"-D QT_NO_<FEATURE>" will enable the QtDesigner build, but it's a
crapshoot as to whether QtDesigner needs that feature. Seeing as how
each iteration takes a long time (configure and build steps) and there
are a lot of features, I was hoping someone else has been down this path
and can tell me exactly what can be pruned out in QtDesigner.

 

Thanks!

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/279f1cd6/attachment.html 


More information about the Qt-interest-old mailing list