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
    Qt products
    Qt5
    Thanked 1 Time in 1 Post

    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,348
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    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, 10:09
  2. Replies: 0
    Last Post: 1st February 2016, 00:31
  3. sort a Qvector based on another Qvector
    By OzQTNoob in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2012, 07:39
  4. Replies: 5
    Last Post: 3rd September 2011, 00:11
  5. Convert data in QVector<QString> to Decimal
    By rex in forum Qt Programming
    Replies: 2
    Last Post: 11th February 2011, 01: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
  •  
Qt is a trademark of The Qt Company.