Skip to content

Instantly share code, notes, and snippets.

@themasch
Created April 27, 2011 12:28
Show Gist options
  • Save themasch/944163 to your computer and use it in GitHub Desktop.
Save themasch/944163 to your computer and use it in GitHub Desktop.
Bla Foo
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