Hello,
I was wondering if there a way to store the values of a Variant inside of a string, in the same fashion that sdbus does it? For example:
sdbus::Variant var(std::vector<int>({1, 2, 3, 4, 5}));
std::cout << var.toString() << endl; //prints 5 1 2 3 4 5
I ask this because I am using the the PropertiesChanged signal and with that it calls a function with a map of strings to Variants, so the type of the property changed can be unknown and I don't want to write out print statements for all possible types I receive.
Hello,
I was wondering if there a way to store the values of a Variant inside of a string, in the same fashion that sdbus does it? For example:
I ask this because I am using the the PropertiesChanged signal and with that it calls a function with a map of strings to Variants, so the type of the property changed can be unknown and I don't want to write out print statements for all possible types I receive.