so how are your files are encoded? and please post the relevant code where you insert the hebrew text to the list widget.
so how are your files are encoded? and please post the relevant code where you insert the hebrew text to the list widget.
it is only my first time i am using the Qt framework.
and i am just tried to do a simple ui with a list and button.
when the user press the button something will add to the list.
in English its absolutely working but in Hebrew its doesn't.
i tried verity of code the last one was:
Qt Code:
void MainWindow::on_pushButton_clicked() { ui->listWidget->addItem(trUtf8("שלום"));}To copy to clipboard, switch view to plain text mode
edit:
i even tried this code:
Qt Code:
ui->textEdit->append(encodedString);To copy to clipboard, switch view to plain text mode
Thank you for helping me!![]()
Last edited by HeX0R; 10th February 2010 at 11:43.
Lykurg, thank you, i did it...
thanks the code:
but it is the right way to do this???Qt Code:
ui->textEdit->append(string);To copy to clipboard, switch view to plain text mode
Edit:
something goes wrong...
when i done this on my native system its work perfectly...
but when i tried this code my virtual machine i got ???? again....
Edit II:
I have to mention that my goal is to build application for the S60 platform
and in the VM i have the S60 SDK installed... if its change something...
Last edited by HeX0R; 10th February 2010 at 12:33.
If it works it is ok, but it is to much for such a simple thing. Still I can only recomend to use pure utf8 for all. Files and then trUtf8.
Ahh, the s60! I had trouble with that also. I was trying to set hebrew with vovels. But with the new release I don't have had troubles. So I would suggest. make a simple compilable program which reproduce your error, and I will check it at home with my Xpressmusic and we will see further...Edit:
something goes wrong...
when i done this on my native system its work perfectly...
but when i tried this code my virtual machine i got ???? again....
Edit II:
I have to mention that my goal is to build application for the S60 platform
and in the VM i have the S60 SDK installed... if its change something...
Thank you man...
but i deleted the project and the entire environment and started from scrach...
Now i can read Hebrew that hardcoded and even readen from file...
But i have another problem with this ... ye rigth...
I change the button "Add" to Hebrew and now he gibrish....
you can see in the picture the button in the rigth upper corner...
![]()
No i made it with the Creator.
here i uploded all the "project" source:
Link to Download page
Thank you very much!
Hi,
there is some strangeness inside you code (at least for me...). I still can say: use utf8 since Qt use that codec. Make sure you have configured Qt Creator to use utf8!
Also QTextCodec was not used correct:Qt Code:
void MainReader::on_pushButton_clicked() { { in.setCodec("Windows-1255"); ui->textEdit->append(line); } } void MainReader::on_pushButton_2_clicked() { ui->textEdit->append(trUtf8("נסיון")); }To copy to clipboard, switch view to plain text mode
and with the button no problem at all. And as a further suggestion: Have a look at the layout mechanism. QHBoxLayout etc.
1) Thank you very much.
2) How can i configure my Creator to use UTF8?
3) the code you written in Button 2 appended only gibberish...
4) with the button on the right up corner, in Windows their is no problem, but in S60 his text in gibberish..
What is the chance that the UTF8 in Windows and S60 are different??
i declared the name of the button like so:
in Windows i got "ה"Qt Code:
To copy to clipboard, switch view to plain text mode
in S60 i got "ש"
What the heck? what i am doing wrong???
Bookmarks