Unsolved what is the best way to use variable read from a doubleSpin in another cpp file?
-
I have a doubleSpin on form 1 and I need to use it value as a variable in another cpp file. I should use global variable or write in a file and read it after or there is a better way to do?
Is it possible to show a short exemple? -
@pedromenezes the best way is to use Signals&Slots for that task.
-
Thank you! I have other variables that get several widgets values. I want to use all the variables, even if the values of all the widgets are not changed. So, is there a way to do a function to get all the values and send them to another cpp file (as a single signal) or do I have to send a signal from each widget to the other file?
Thanks again.
-
@pedromenezes You can have a signal with more than one parameter or you create a struct containing these parameters and use this struct as parameter type for your signal.