sprintf is useful for other stuff
QString has constructor that takes a char* (and, as kito said, the operator= also can take char*).