Qt Widgets Memory Requirements
-
wrote on 12 Aug 2023, 22:45 last edited by
What are the typical minimal memory requirements for a Qt Widgets application? I've designed a minimal test app and am seeing memory usage of 57MB on my embedded system for a small window with some text and a couple of graphics.
-
What are the typical minimal memory requirements for a Qt Widgets application? I've designed a minimal test app and am seeing memory usage of 57MB on my embedded system for a small window with some text and a couple of graphics.
@Dane-0 Depends on Qt version, your platform, which modules and features you use do you use static or dynamic linking and what actually is a typical application to you. There's no single answer to any of that.
As a random single point of data (by no means any indicator) - an app with single empty widget on MSVC Qt 6.5.2 and Win11 takes about 20MB on my machine, 40KB of the actual executable and the rest are the dependencies - core, gui and widgets modules along with compiler runtime and shared system libs.
Use whatever tools your platform provides to do a breakdown of your mem usage - how much is the executable, dependencies, what libraries you're actually pulling. How much of it is the graphics data? How are you presenting them? Are you using e.g. OpenGL? Make a 5 line app with an empty widget and see how much that takes on your platform.
-
@Dane-0 Depends on Qt version, your platform, which modules and features you use do you use static or dynamic linking and what actually is a typical application to you. There's no single answer to any of that.
As a random single point of data (by no means any indicator) - an app with single empty widget on MSVC Qt 6.5.2 and Win11 takes about 20MB on my machine, 40KB of the actual executable and the rest are the dependencies - core, gui and widgets modules along with compiler runtime and shared system libs.
Use whatever tools your platform provides to do a breakdown of your mem usage - how much is the executable, dependencies, what libraries you're actually pulling. How much of it is the graphics data? How are you presenting them? Are you using e.g. OpenGL? Make a 5 line app with an empty widget and see how much that takes on your platform.
wrote on 16 Aug 2023, 07:32 last edited by@Chris-Kawa Thanks. 20MB provides a good rough indication. I have libs built with debugging symbols currently so that will be inflating things. I've decided to just significantly up the size of the RAM on the board as the price difference is not large for the hassle. I'll nonetheless do a bit of investigation into the memory usage breakdown however.
1/3