Hello. I'm newbie on QT.
I'm sorry for my english.
I want to display MessageBox that include Korean string(from MYSQL).
Numeric with Alphabet is well done. Only Korean string is broken display.
The Code is like it.
-------------------------------------
QSqlQuery *query
= new QSqlQuery("select Name from User where id='"+id
+"' and password='"+password
+"'");
//set query //Name is Korean String char(12)
query->exec();
query->next();
temp1=query->value(0).toString(); [B][I]// this step need not convert encoding????[/I][/B]
char *string=temp.data();
QSqlQuery *query= new QSqlQuery("select Name from User where id='"+id+"' and password='"+password+"'"); //set query
//Name is Korean String char(12)
query->exec();
query->next();
QString temp1;
temp1=query->value(0).toString(); [B][I]// this step need not convert encoding????[/I][/B]
QByteArray temp=temp1.toLocale8Bit();
char *string=temp.data();
QMessageBox::information(this, "Information", QString::fromUtf8(string), QMessageBox::Ok);
To copy to clipboard, switch view to plain text mode
Bookmarks