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]QList holding another QList
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]QList holding another QList

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    thehilmisu
    wrote on 12 Nov 2012, 08:04 last edited by
    #1

    Hi everyone,
    I need a QList to held another QList. It is like
    @QList<QList> list;@

    Is there any way to do it?
    Thanks in advance,

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dmcr
      wrote on 12 Nov 2012, 08:08 last edited by
      #2

      Yes, you can use QList<QList<yourItem> >

      Just don't forget the space between the ">" to make a distinction with the >> operator.

      dmcr

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thehilmisu
        wrote on 12 Nov 2012, 08:12 last edited by
        #3

        Thank you. It never cross my mind that put a space between the operators.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dmcr
          wrote on 12 Nov 2012, 08:39 last edited by
          #4

          Nope. it's just that there is an operator >>.
          Like for example @qDebug() << myObject @
          To make a distinction with this and our case, ( for the moc compilation ), a space helps to avoid confusion.

          dmcr

          1 Reply Last reply
          0

          3/4

          12 Nov 2012, 08:12

          • Login

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