Created
April 27, 2011 12:28
-
-
Save themasch/944163 to your computer and use it in GitHub Desktop.
Bla Foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QPointF *parsePoint(QString in) | |
{ | |
QStringList lst = in.split(", "); | |
if(lst.count() == 2) { | |
QString first = lst.at(0); | |
QString sec = lst.at(1); | |
bool fok, sok; | |
double a = first.toDouble(&fok); | |
double b = sec.toDouble(&sok); | |
if(fok && sok) { | |
QPointF *point = new QPointF(a, b); | |
return point; | |
} else { | |
return 0; | |
} | |
} else { | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment