Hi
my program keeps list of strings which contains also latin-1 characters like a and o with dots. Problems is when these strings are passed to QML model entity conversions is not handled correctly and on UI strange characters are show ... So how and where conversions should take in action ?
conponent is Listview which model filled in the C++ side using contextproperty functionaliy
m_rootContext->setContextProperty("mainCategoryModel", QVariant::fromValue(dataList));
and
QList<Object> datalist
conversion to Latin1 or toAscii has no effect in the C++ side, as
QString CategoryObject::name() const
{
return m_category.m_categoryName.toLatin1();
}
Actually everthing it's get wrong at start. ...
I do have something like this :
static char *foo[2][2] = { { "1", "2" },
{ "Åke", "Ängtröm"} };
QString test (foo[1][1]);
qDebug() << test;
and
qDebug() << test;
got output somthing like this :
Ängtröm
This is more qt c++ problem ....
Bookmarks