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. Difference between QString and std::string
Forum Updated to NodeBB v4.3 + New Features

Difference between QString and std::string

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k 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.
  • Q Offline
    Q Offline
    QtFranchise
    wrote on 12 Mar 2020, 14:34 last edited by
    #1

    Hi, I wanted to know what is the difference between QString and std::string. I understood std::string as char* and QString uses linked list concept to store strings. Is am I right?

    J 1 Reply Last reply 12 Mar 2020, 14:41
    0
    • Q QtFranchise
      12 Mar 2020, 14:34

      Hi, I wanted to know what is the difference between QString and std::string. I understood std::string as char* and QString uses linked list concept to store strings. Is am I right?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 12 Mar 2020, 14:41 last edited by
      #2

      @QtFranchise said in Difference between QString and std::string:

      QString uses linked list

      For sure not, would be quite inefficient. Check this: https://code.woboq.org/qt5/include/qt/QtCore/qstringliteral.h.html#QStringData
      Take a look at https://wiki.qt.io/QString

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      5
      • Q Offline
        Q Offline
        QtFranchise
        wrote on 14 Mar 2020, 04:20 last edited by
        #3

        Ok got it, thanks

        1 Reply Last reply
        0

        1/3

        12 Mar 2020, 14:34

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved