Best practice for managing multiple themes and UI states in a large Qt Design Studio project (25+ screens)
-
Hi everyone,
I’m working on an automotive HMI for a two-wheeler using Qt/QML and Qt Design Studio.
The project has 25+ screens, and most of the front-end QML code has been generated directly by Design Studio.I have a question regarding the best architecture for theming and UI state management.
- Theme Management
Currently, I use a custom Theme Manager (as a QML singleton) that switches:
colors
fonts
icons/images
Based on the selected theme.
This works, but I'm not sure if this is the ideal approach for a large project created with Design Studio.
Is it better to:
Continue using a centralized Theme Manager, Or rely on Design Studio states, Flow, and component properties for theme switching, Or mix both approaches?- UI States generated by Design Studio
Design Studio generates a lot of states, timelines, and property bindings in the QML files for each screen. With 25+ screens, I want to keep everything clean and maintainable.
So my question is:
Is it recommended to keep the Design Studio generated states as-is, or should I refactor / centralize some of the UI logic manually to avoid duplication and complexity?Additional context
Screens are mostly visual/UI heavy
Themes change only colors, fonts, and imagesI want to maintain performance on embedded hardware because with my business logic cpu spike is nearly 80% + and application lags and one more thing i am integrating map on my application
- Theme Management
-
@GrecKo can you suggest anything upon it