[vtk-developers] Converting vtkUnicodeString to QString
Jeff Baumes
jeff.baumes at kitware.com
Mon Sep 14 09:34:19 EDT 2009
What is the correct way to convert a vtkUnicodeString to QString? I can do
QString qs = QString::fromUtf8(str.utf8_str());
This also seems to work
QString qs = QString::fromUtf16(&str.utf16_str()[0]);
Are both equally valid, since the internal storage of vtkUnicodeString is
UTF8 and for QString it is UTF16, so one conversion must take place either
way?
Why does utf8_str() return a char* but utf16_str() return a vector?
Jeff
--
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4932
jeff.baumes at kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090914/4c19aefd/attachment.html>
More information about the vtk-developers
mailing list