Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Where to save a Facade class and other non-GUI classes?
WhatIf last edited by
I'm starting to learn Qt and OOP C++. While the current test project is not big, I want to use a Facade class to decouple the GUI from the core classes but don't know in which folder to save the Facade class and the other core classes. Currently, I have the Headers, Sources, and Forms folders created by Qt. Just want to learn the best way to save these classes in case this current project gets bigger and in future projects I code so it won't be a mess of classes.
Here is a link to the Facade example that I will be implementing:
Not the exact example but a Facade class and 2 other classes that aren't related.
is there any reason not just to save them with the other files?
The Facade pattern presents a sub system to the rest of application
but its not about hiding the actual files,
but to give a easier view of multiple objects or interfaces.
For bigger projects we often use subfolders for different modules
and patterns would go into the same folder as what ever it helps with.
since you navigate in the editor, having many files in same folder is not such an issue. (IMHO)