Results 1 to 4 of 4

Thread: QVector copy constructor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    142
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QVector copy constructor

    Quote Originally Posted by jpn View Post
    Are you sure you even need QVector? For most purposes, QList is the right class to use. Do you really need continuous memory?
    generally either I process every item in a for loop or I use direct accesses using indices, so I suppose it works quicker on continuous tables...

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QVector copy constructor

    I recommend reading Generic Containers documentation. Pay special attention to "algorithmic complexity".
    J-P Nurmi

Similar Threads

  1. default parameters in constructor class
    By mickey in forum General Programming
    Replies: 4
    Last Post: 23rd February 2008, 18:44
  2. Using setCodecForCStrings(codec) in Constructor
    By danbetz in forum Qt Programming
    Replies: 5
    Last Post: 30th July 2007, 21:23
  3. QDialog: show() and exec() together in constructor?
    By Teuniz in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2007, 11:43
  4. Killing a Window in its constructor
    By hardgeus in forum Qt Programming
    Replies: 6
    Last Post: 15th December 2006, 18:31
  5. use libs under qt4
    By raphaelf in forum Qt Programming
    Replies: 6
    Last Post: 27th February 2006, 17:59

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.