I have a struct point
struct Point
{
double x;
double y;
double z;
}
And want to convert it to a QString "(value of x, value of y, value of z)" and convert it back? Any easy way? What I figured out for the forward conversion is
QString PointToString( const Point& pt )
{
return QString("(%1, %2, %3)").arg(pt.x).arg(pt.y).arg(pt.z);
}
And I cannot figure out how to convert it back.
Point StringToPoint( const QString& s )
{
// How?
}
Thanks.