Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QString Error



  • 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?



  • Hi sad2 ,

    what OS are you using?



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



  • 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.


Log in to reply