Solved AnsiString equivalent in qt
James Sprinks last edited by
I am re-writing some old C++ Builder code into Qt, and have come across a variable type:
From what I gather it is a form of 'long string', can anyone help me out with what the equivalent is in Qt?
Pablo J. Rogina last edited by
@James-Sprinks could you provide some more context about how this variable is used, i.e. what values is assigned, how is employed in your code?
VRonin last edited by
If you are referring to this class then
QStringworks and uses UTF8. If you rely on the fact that it will use the system encoding method then restrict interations with it to use
mrjj Lifetime Qt Champion last edited by
QString will do anything you are used to AnsiString does. ( it seems so far)
The only surprise is that
QString test ="val = " + val;
Does NOT give you "Val =10" as AnsiString would.
In Qt that is
QString test ="val = " + QString::number(val);