Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTableWidget Headers, QStringList and character set
JohK last edited by
I wanted to create a QStringList where the strings containg special characters. Therefore I created the following code (similar to the explanation in Qt documentation):
QStringList Headers; Headers << "Empfänger" << .....; tableWidget->setHorizontalHeaderLabels(Headers);
However, when the program is run the "ä" in "Empfänger" in the Header in the QTableWidget is shown as 2 special characters (can't show them here..)
How can I show the "ä" in the Header?
Hi and welcome to devnet,
Which version of Qt ?
On which platform ?
With which compiler ?
What are your locale settings ?
The very best thing is to limit the character set in source files to ASCII (that's what I do).
Qt provides translation tools, which allows to write
tr("Receiver")in your source code and translate the program later to any language you like. Please see for more information: http://doc.qt.io/qt-5/i18n-source-translation.html