Important: Please read the Qt Code of Conduct -

QTableWidget Headers, QStringList and character set

  • Hi all,
    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" << .....;

    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?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Which version of Qt ?
    On which platform ?
    With which compiler ?
    What are your locale settings ?

  • Lifetime Qt Champion

    Hi @JohK,

    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:

Log in to reply