I realized that QVariant does not offer functionality for long and unsigned long . It offers int , unsigned int , long long and unsigned long long conversions.
In modern desktop architectures, we can find that long and int equivalent, but they are not from a theoretical point of view.
If I want to store long in QVariant , I must first convert the value to long long . I would like to know if there is another way to overcome this.
Secondly, I am interested to know a better / easier way to do this. That is, using simpler code and avoiding the use of extra space or instructions.
source share