Storing global variables for using them by threads
Solved
General and Desktop
-
Hi there. I'm creating a desktop app, and there are many-many global variables(about 400). They are used by threads. So, what do you advice, should I store them inside a class or QSettings?
If QSettings would be better choice, what about it's speed?
Thanks in advance. -
@Abdurahman_Gulamkadirov Best advice is to not to use global variables. Such variables should only be used if really necessary. 400 global variables really sounds like bad design.
QSettings should not be used to hold variables at runtime. QSettings is used to save and read application settings.