hi I need put the col nu,ber inside f; this is working; is there a better way? (eg more fast) thanks
Qt Code:
  1. QString col = "1 1.5 0.5 1";
  2. float f[4];
  3. for (int i=1; i <= col.length(); i++) {
  4. int p=0;
  5. if (col.at(i) == ' ') {
  6. QString c = QString::fromAscii(col,i);
  7. f[p] = c.toFloat();
  8. p++;
  9. }
  10. }
To copy to clipboard, switch view to plain text mode