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. QList append Object between
Qt 6.11 is out! See what's new in the release blog

QList append Object between

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.6k Views 2 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi,

    me again. I want to know if there is a Possibility to append an Object in a QList between Values. So if i pop_back 2 Values and insert the new Object in the QList at this Position. Is that possible?

    JKSHJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      The Qlist is a template class.
      So you can insert any type into it. but they must all be same type.

      So you cannot insert 2 ints and then an Object.
      it can be ints or Object.

      But maybe if u explain what you want with more details, we can find solution.

      1 Reply Last reply
      0
      • ? A Former User

        Hi,

        me again. I want to know if there is a Possibility to append an Object in a QList between Values. So if i pop_back 2 Values and insert the new Object in the QList at this Position. Is that possible?

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        QList::insert()

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        mrjjM 1 Reply Last reply
        2
        • JKSHJ JKSH

          QList::insert()

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JKSH
          You read better than me :)
          I thought he wanted to mix types. (doh)

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            insert is it? No i have the same Objects, but want to insert an Object into a QList betweens 2 Values. I try it later.

            jsulmJ 1 Reply Last reply
            0
            • ? A Former User

              insert is it? No i have the same Objects, but want to insert an Object into a QList betweens 2 Values. I try it later.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Fuel You can find all needed information in the documentation:
              http://doc.qt.io/qt-5/qlist.html#insert
              http://doc.qt.io/qt-5/qlist.html#insert-1

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

              1 Reply Last reply
              1

              • Login

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