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

Help i need current device QString to Qvector



  • with this i get the path of my user:
    QString homePath = QDir::homePath();

    But i need to take the three first letters; I was thinking to change qstring to qvector and then take the three letters. And then return in string. Someone can share with me one example.



  • Hi!

    qDebug() << QDir::homePath().left(3);
    

    Cheers!


Log in to reply