Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Problem with encoding (cz)
Hi,
I have problem with encoding in kListView object.
I'm from Czech rep. and I need some special czech characters in KListViewItem.
I have a code like below for insert two items string into Klistview.
void Dictk::VypisSlova(QStirng sl1, QString sl2){
KListViewItem *element;
QTextCodec* codec = QTextCodec::codecForName( "ISO 8859-2" );
QCString encoded_string = codec->fromUnicode( sl1 );
QCString encoded_string2 = codec->fromUnicode( sl2 );
element = new KListViewItem(kListView1, encoded_string, encoded_string2);
But instead czech characters is '?'.
How can I solve this problem?
Thanks a lot to all
....:: Metr X (YZ) ::...
KListViewItem needs unicode names! And all since widgets too since Qt 2.
|
Source code
|
1
2
3
4
|
void Dictk::VypisSlova(QString sl1, QString sl2)
{
KListViewItem *element;
element = new KListViewItem(kListView1, sl1, sl2);
|
hmm
thx, but Im not sure that understand, because I didnt solve my problem....
....:: Metr X (YZ) ::...