PDA

View Full Version : QTableWidget Headers don't hangle accentuated characters



tuthmosis
28th May 2010, 12:22
The following will generate a header containing "Ä©" instead of "é"


item->setText("é");
ui->tableWidget->setHorizontalHeaderItem( i++, item);

What am i doing wrong ?

tuthmosis
28th May 2010, 17:28
Anyone ?
QTableWidget really don't support UTF8/Unicode ?

alexisdm
28th May 2010, 18:17
You have to set utf8 as the default for decoding literal strings to QString with

QTextCodec::setCodecForCStrings(QTextCodec::codecF orName("utf8"));
preferably before you create any widget.