[vtkusers] vtkStringArray problem
David Gobbi
david.gobbi at gmail.com
Wed Dec 3 14:40:24 EST 2014
Hi Rich,
Your use of vtkStringArray is correct, so I suspect the conversion
from QString is where the problem is occurring.
In my own apps, I've standardized on using utf8 and my QString
conversion would be as follows:
QString fpath = dir.absoluteFilePath(list.at(i));
QByteArray text = fpath.toUtf8();
stringArray->InsertNextValue(text.data());
I avoid using toStdString() because it is lossy (it forces conversion
to ASCII).
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141203/6f23d4ae/attachment.html>
More information about the vtkusers
mailing list