Unsolved Using .pro variables in .cpp
-
Hello!
I want to save a variable in .pro file and then, use it in a class. How can I do it?
Thank you very much!
-
@ivanicy
easiest way is probably to use DEFINES (preprocessor) -
Hi
Look here ( to expand on @raven-worx answer)
https://forum.qt.io/topic/82531/defines-in-qt-creator -
Other elegant way is a class name "Config"
https://github.com/wang-bin/QtAV/blob/568f8c7f365ba2d494956ac59cb6a79ae2485e26/examples/common/Config.hWo write setting direct to ini from OS.. I saw very well this class work on all mobile device & desktop mac window linux ... I was surprised .. waht this smal box can do ...