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. How do I create a QList of QList<QString>?
QtWS25 Last Chance

How do I create a QList of QList<QString>?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 928 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.
  • D Offline
    D Offline
    Dr. No
    wrote on last edited by Dr. No
    #1

    Something like this:

    ``` QList<QList<QString>> output; ```
    
    aha_1980A 1 Reply Last reply
    0
    • D Dr. No

      Something like this:

      ``` QList<QList<QString>> output; ```
      
      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi @Dr.-No,

      and what is your question? The code you posted is correct.

      Just note, that for older compilers you need to add a space between the closing >.

      Regards

      Qt has to stay free or it will die.

      D 1 Reply Last reply
      7
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        declare it as
        QList<QList<QString>> abc;
        QList<QStringList> xyz;

        Does it help ?

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        3
        • aha_1980A aha_1980

          hi @Dr.-No,

          and what is your question? The code you posted is correct.

          Just note, that for older compilers you need to add a space between the closing >.

          Regards

          D Offline
          D Offline
          Dr. No
          wrote on last edited by
          #4

          @aha_1980 I compiled as C++11 then it worked. I wasn't aware of this. Thank you all guys.

          Pablo J. RoginaP 1 Reply Last reply
          1
          • D Dr. No

            @aha_1980 I compiled as C++11 then it worked. I wasn't aware of this. Thank you all guys.

            Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by
            #5

            @Dr.-No if your issue is solved, don't forget to mark your post as such. Thanks

            Upvote the answer(s) that helped you solve the issue
            Use "Topic Tools" button to mark your post as Solved
            Add screenshots via postimage.org
            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

            D 1 Reply Last reply
            0
            • Pablo J. RoginaP Pablo J. Rogina

              @Dr.-No if your issue is solved, don't forget to mark your post as such. Thanks

              D Offline
              D Offline
              Dr. No
              wrote on last edited by
              #6

              @Pablo-J.-Rogina Done!

              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