Results 1 to 6 of 6

Thread: using QPair in QVector

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Location
    Taiwan
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default using QPair in QVector

    Dear All:
    I use QPair in QVector when developing .
    But there's some problem.
    here is text example:

    Qt Code:
    1. void test()
    2. {
    3. QVector< QPair< int , QString > > first;
    4. QVector< QPair< int , QString > > second;
    5.  
    6. for(int iIdx = 0; iIdx <5 ; ++iIdx )
    7. first.push_back(QPair< int , QString >(iIdx , "aaa") );
    8.  
    9. qCopy(first.begin(), first.end(), second.begin()); // it occurred errors
    10. }
    To copy to clipboard, switch view to plain text mode 

    Is there any suggestion for me if I would like to copy from one vector to another ??
    Thank you~~
    Last edited by jpn; 28th January 2009 at 09:15. Reason: missing [code] tags

Similar Threads

  1. QVector copy constructor
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 3rd March 2008, 17:52
  2. Problem with qvector
    By zorro68 in forum Qt Programming
    Replies: 1
    Last Post: 23rd February 2008, 01:02
  3. QVector Explosion
    By baray98 in forum General Programming
    Replies: 1
    Last Post: 11th November 2007, 15:12
  4. Memory allocation failure and crash in QVector
    By ashatilo in forum Qt Programming
    Replies: 16
    Last Post: 20th October 2007, 23:27
  5. QVector
    By sabeesh in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2007, 14:37

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.