Results 1 to 8 of 8

Thread: QVector copying data with remove()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QVector copying data with remove()

    Quote Originally Posted by d_stranz View Post
    The only way to avoid copying is to use some other data collection, like QList<>.
    Not really. QList is implemented in a similar way as QVector with the only important difference that QVector always grows "at the far end" while QList can grow in both directions (meaning that if you need to insert an element in the first half of the data structure, the list will grow at the near end, if you insert in the second half, it will grow at the far end). You probably meant QLinkedList but that's very rarely used as random access to a linked list is not possible so it is very slow for such cases.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    Momergil (13th June 2014)

Similar Threads

  1. Copying data within model/widgetmapper
    By scott_hollen in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2011, 18:27
  2. Memory aligned QVector().data()
    By sto in forum Qt Programming
    Replies: 10
    Last Post: 19th November 2010, 09:30
  3. memory leak when copying Qimage data
    By klobauster_toomc in forum Qt Programming
    Replies: 2
    Last Post: 25th February 2010, 08:33
  4. [[SOLVED]]Can't get data from QVector
    By asieriko in forum Newbie
    Replies: 1
    Last Post: 13th December 2009, 19:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.