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 Error

QString Error

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 908 Views
  • 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.
  • S Offline
    S Offline
    sad2
    wrote on last edited by
    #1

    Actually i'm using Qt 5.9 but this error appears when i try run my code:

    alt text

    The QString library are declared, i dont know what to do, someone can help me?

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi sad2 ,

      what OS are you using?

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlexMal
        wrote on last edited by
        #3

        how commando_ant is declared?
        By the way fromAscii is obsolete you can use fromLatin1() instead.
        It still should be available though.

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by Eddy
          #4

          from the qstring.h sources :

          #if QT_DEPRECATED_SINCE(5, 0)
              QT_DEPRECATED static inline QString fromAscii(const char *str, int size = -1)
              { return fromLatin1(str, size); }
              QT_DEPRECATED static inline QString fromAscii(const QByteArray &str)
              { return fromLatin1(str); }
              Q_REQUIRED_RESULT QByteArray toAscii() const
              { return toLatin1(); }
          #endif
          

          So obviously it is in there but, you have to change some settings in your app. I would follow @AlexMal 's advice however.

          Qt Certified Specialist
          www.edalsolutions.be

          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