Results 1 to 5 of 5

Thread: passing 'const QList<Element>' as 'this' argument of 'QList<T>& QList<T>::operator<<(

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: passing 'const QList<Element>' as 'this' argument of 'QList<T>& QList<T>::operato

    QList::at() returns a const value. It's the same as above. If you want to alter elements you have to use insert or replace, or better use the []operator.

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

    bigkoma (20th August 2010)

Similar Threads

  1. QList<MyClass> to const QList<const MyClass>
    By juanluispaz in forum Newbie
    Replies: 4
    Last Post: 6th May 2010, 19:27
  2. Copying an QList into a new, sorted QList.
    By Thomas Wrobel in forum Newbie
    Replies: 3
    Last Post: 11th January 2010, 18:27
  3. Change a QList element
    By mcrahr in forum Newbie
    Replies: 1
    Last Post: 23rd August 2009, 11:16
  4. QList: Out of memory - without having defined QList
    By miroslav_karpis in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2009, 08:42
  5. QList Overloading operator==()
    By josepvr in forum Qt Programming
    Replies: 8
    Last Post: 28th January 2009, 15:28

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.