Robert Osfield schrieb:
On 6/12/07, Oleg Dedkow <[EMAIL PROTECTED]> wrote:
text() returns QString, so we have to convert the returned value to int
Does the toInt() convert from string to an an ascii number i.e. 'A' to
65, or does it convert something like "200" to an int of 200?
I was not aware of 16-bit encoding used by QString class. 'toInt(bool*
ok = 0, int base = 10)', used with default parameters, returns '0' for
all characters excepting numbers, i.e. '0' for 'a' and '1' for '1'.
QString::toAscii() returns an ASCII encoded 8-bit string as QByteArray.
*( text().toAscii().data() ) returns therefore 'a' for the character 'a'.
Oleg
Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/