In this section, it's said that the developer must manually use Q_INIT_RESOURCE when they build the app statically.
The provided code snippet is this:
In my opinion, it could give readers some questions, such as
- In this snippet, the Q_INIT_RESOURCE() is used in the user-defined class. Does it mean the developer should call it whenever he wants to use a file in a specific qrc file?
- If so, isn't it broating the code too much? -> less maintenability
- Also, if that's the case, should resource files, such as png files, be packed together in each .qrc file which is used in different places? Doesn't it lead to many qrc files and possible maintenance nightmare?
- Can we just call Q_INIT_RESOURCE in one place and that's all? <- imo, showing this way is the best.