[Qt-interest] Convert a QString to string

Jan Ekholm jan.ekholm at smultron.net
Tue Feb 10 15:05:18 CET 2009


On Tuesday 10 February 2009, Sujan Dasmahapatra wrote:
> How can I convert a    QString  str1 to string str2.

Assuming you mean std::string it's pretty obvious if you actually look into 
the docs a bit...

	std::string QString::toStdString () const

-- 
Jan Ekholm
jan.ekholm at smultron.net



More information about the Qt-interest-old mailing list