1

I would like to convert the QString:

 QString ch1_rxBitErrCount = ch1_totalBitCount_ones + "." + ch1_totalBitCount_dec + "E" + ch1_totalBitCount_exp;
 //ch1_rxBitErrCount = "1.56E13";

to scientific notation, recognizable/computable in Qt.

Haven't found the reference function to do this, so if someone could point me to it, that'd be much appreciated.

Thanks in advance!

Rachael
  • 1,965
  • 4
  • 29
  • 55
  • So you have missed the whole lot of `toXyz` methods in `QString` documentation? You can't claim not to have found it if you didn't even look... There's really no way to miss it. You use the `QString` class, you need to actually read its documentation like you would a book. Start to finish. You clearly didn't. – Kuba hasn't forgotten Monica Jul 16 '14 at 06:14
  • @KubaOber : Well, thanks for lashing. After my first couple days of Qt, I'll make sure to comb every class that applies to my project next time before I ask for help. Since you did troll my other question, didn't read it, didn't read my comment below, and provided no explanation for what you posted (which repeated part of my question, providing no relevant solution), [Here it is if you need to revist and read again](http://stackoverflow.com/a/24773401/1751090). – Rachael Jul 16 '14 at 17:17
  • You'll understand after you've seen your first hundredth question that mentions one class only and the method sought is in the documentation of the very class mentioned :/ There's thousands such questions here. I'm not exaggerating. There have been thousands more that were closed. – Kuba hasn't forgotten Monica Jul 16 '14 at 18:58

1 Answers1

0

You can convert QString to float or double over QString methods toFloat()or toDouble() like:

double mydouble = ch1_rxBitErrCount.toDouble();
nib
  • 700
  • 8
  • 15