Memory Requirement for Qt
-
Hello,
We are looking to use Qt for GUI requirements on our embedded device, where we have an ARM code based processor.
As of now, we are planning to port Embedded Linux, upon which we would be using Qt.
However, I want to know the RAM and ROM requirements for using Qt. i.e. how much minimum RAM shall I have on my embedded device?
It will be great if you could also guide me to a particular article which summarizes the memory requirements for Qt.
Thanks in Advance.
Regards,
Nishant -
That depends a lot on which parts of Qt you will be using. If we are talking about QtCore, QtNetwork (no gui) on a Linux, you probably need about 5MB of RAM for the libraries. Both gui packages (QtQuick, QtWidgets) add considerably to this (10-20MB). And there are others, too, of course.
There is a way to lower the memory requirements significantly: compile Qt statically, carefully exclude the parts you do not need, and use compiler options to minimise space requirements. This all is advanced stuff, but when used properly, the benefits can be really huge.
-
Hey sierdzio,
Thanks for the input.
From the reference at "this":https://qt-project.org/forums/viewthread/52998/#219854 page, I understand that you are referring QtQuick as QtGui. Is it?
Please correct me if I am wrong.
From the above link, I also understand that memory requirements would be based upon the platform on which I am using it.
Excluding the non-required parts is about fine tuning features in Qt, am I correct?
Your inputs are really valuable to me.
Thanks in advance.
Regards,
Nishant -
Hey,
Seems like there's an error in the URL.
This one is the correct URL.
http://qt-project.org/doc/qt-4.8/requirements-embedded-linux.html#memory-requirements
Regards,
Nishant -
Sorry, I was talking about Qt 5, where QtGui is only a very minimal base package for QtWidgets and QtQuick modules.
In Qt 4, QtGui == QtWidgets, and QtQuick was named QtDeclarative.
-
Hey,
Sorry but I am bit confused. Are you saying that the URL I referred mentions about Qt 4?
If yes, does that mean gui packages (QtQuick and QtWidgets) have a higher size of about 11 MB?
I also understand that QtWdget of Qt5 is actually QtGui of Qt4. And QtQuick package is required for GUI but something I missed out.
Please correct if I am wrong.
Regards,
Nishant -
Of course! See the "qt-4.8" part in the URL?
In Qt 5, you have a choice: you build your UI using widgets, or using QML and QtQuick. So you choose either QtWidgets (this is old QtGui form Qt4), or QtQuick (an entirely new module, based on ideas from QDeclarative).
Please compile Qt yourself and check the file sizes. This can vary a lot depending on CPU architecture, configuration settings, and so on. I do not want to give you bad numbers.
Qt 5 also has more dependencies, like ICU library, which can take up to 30MB (but is included in most Linux distributions, so it adds memory only on platforms like Windows).
-
Hey,
Many thanks for your input.
I am planning to install Qt on my machine in couple of days and would find out the exact requirement.
However, your inputs were of utmost importance and has given me a pretty good guidance.
Thank you once again.
Regards,
Nishant