Hi,

I have a issue regarding canConvert<>() template function. Consider the following example,

Qt Code:
  1. QVariant varConvertToDouble;
  2. varConvertToDouble.clear();
  3. varConvertToDouble = ASD28E+01;
  4.  
  5. bool bCheck = varConvertToDouble.canConvert<double>(); // Here bCheck is 'true'
  6. bool bCheck2 = varConvertToDouble.canConvert(QVariant::Double); // Here bCheck2 is 'true'
  7.  
  8. bool* bValid = new bool();
  9. varConvertToDouble.toDouble(bValid); // Here *bValid is 'false'
To copy to clipboard, switch view to plain text mode 

As a result the 2 APIs of QVariant are contradicting to each other. Could anybody please throw light on this?

PS: I have found a similar thread http://www.qtcentre.org/threads/1921...ght=canconvert. But there is no confirming answer to this.

Thanks,
Nikhil