You are not logged in.

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.

koca

Beginner

  • "koca" started this thread

Posts: 2

Location: CZ

Occupation: Net administrator

  • Send private message

1

Wednesday, July 7th 2004, 9:23pm

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) ::...

rm

Beginner

Posts: 1

Location: Barnaul / RU

  • Send private message

2

Sunday, July 11th 2004, 10:26pm

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);

koca

Beginner

  • "koca" started this thread

Posts: 2

Location: CZ

Occupation: Net administrator

  • Send private message

3

Tuesday, July 13th 2004, 7:07pm

hmm

thx, but Im not sure that understand, because I didnt solve my problem....
....:: Metr X (YZ) ::...