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. [Solved]Working with QStrings
QtWS25 Last Chance

[Solved]Working with QStrings

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.7k 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.
  • P Offline
    P Offline
    Peppy
    wrote on last edited by
    #1

    Is there any class to work with QString class?

    Cause I have to work with strings or I have to use STL class?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      secretNinja
      wrote on last edited by
      #2

      The "QString class":http://doc.qt.nokia.com/latest/qstring.html have so many functions within it. What else do you want to do with strings?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Peppy
        wrote on last edited by
        #3

        for example: substr(...), strtok(...) and so on...maybe they are there, maybe I've been just blind...

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          You can combine with stl string, if you have qt compiled with stl support. It looks like you are used to stl anyway.
          to convert from QString to stl string use toStdString

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            If you do not want to mix Qt and stl, you can use QString::mid for substr and QString::split for strtok.

            Vote the answer(s) that helped you to solve your issue(s)

            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