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. QString toUtf8 () is not working.
Qt 6.11 is out! See what's new in the release blog

QString toUtf8 () is not working.

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.0k 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.
  • M Offline
    M Offline
    Mahima
    wrote on last edited by
    #1

    Hi ,

    I am compiling Qt 5.1.1 with VS 2008 and this code below is giving me error that "error C2039: 'toUtf8' : is not a member of 'QString".

    QByteArray utf8Out = description.toUtf8 ();

    description is a QString.

    I dont know what I am doing wrong.

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      where did you get this Qt version from?
      The Qt source code doesn't contain any macros which would hide the QString::toUtf8() method.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mahima
        wrote on last edited by
        #3

        Thanks for your reply.
        Somehow some changes are done in qstring.h at the time of fixing errors in my project. I made the correction.

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          so it's working now for you?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mahima
            wrote on last edited by
            #5

            Yeah, it is working now.
            Thanks.
            But now I am getting linking errors on compiling Qt 51.1 with Visual Studio 2008. I have already started a new discussion in the forum about the issue. Please have a look if you have any idea about the same.

            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