Results 1 to 2 of 2

Thread: Need current device i can use qstring and qvector to get this?

  1. #1
    Join Date
    Sep 2016
    Posts
    78
    Thanked 1 Time in 1 Post
    Qt products
    Qt5

    Default Need current device i can use qstring and qvector to get this?

    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.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Need current device i can use qstring and qvector to get this?

    QString::left()
    QDir::homePath() has nothing to do with "devices", especially not a "current device".
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 6
    Last Post: 11th February 2016, 09:09
  2. Replies: 0
    Last Post: 31st January 2016, 23:31
  3. sort a Qvector based on another Qvector
    By OzQTNoob in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2012, 06:39
  4. Replies: 5
    Last Post: 2nd September 2011, 23:11
  5. Convert data in QVector<QString> to Decimal
    By rex in forum Qt Programming
    Replies: 2
    Last Post: 11th February 2011, 00:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.