Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unicode problem
Qt 6.11 is out! See what's new in the release blog

Unicode problem

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahura_24
    wrote on last edited by
    #1

    hi every body ? i use visual studio 2008 and qt creator 2.5 and Qt library 4.8.2

    @
    #include <QtGui>

    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);

    QPushButton btn;
    btn.setText( QString::fromWCharArray(L"شسیسیب") );
    btn.show();
    
    return app.exec();
    

    }
    @

    my unicode doesnt work and shown "??????" in window . please help me.tnx

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ahura_24
      wrote on last edited by
      #2

      i use this code in other version and work correctly but in this version why doesnt work ?!!! :(

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        quendimax
        wrote on last edited by
        #3

        You can to code your source file in the UTF-8 and use the QString::fromUtf8() method.
        Default VS saves files in other charset.

        Also read "it":http://qt-project.org/doc/qt-4.8/qtextcodec.html

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ahura_24
          wrote on last edited by
          #4

          tnx

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved