Results 1 to 9 of 9

Thread: QLinkedList iterator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QLinkedList iterator

    Hi,

    I'm having problems yet.

    code.h
    Qt Code:
    1. QLinkedList<MyClass*> m_qLinkedList;
    2. QMutableLinkedListIterator<MyClass*> m_qIterator; //The compiler don't let me do this
    To copy to clipboard, switch view to plain text mode 

    Any idea how to do a iterator variable?

    Thanks,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QLinkedList iterator

    Hi,

    I'm trying to change:
    Qt Code:
    1. QMutableLinkedListIterator<MyClass*> m_qIterator;
    To copy to clipboard, switch view to plain text mode 
    for:
    Qt Code:
    1. QLinkedList<MyClass*>::iterator m_qIterator;
    To copy to clipboard, switch view to plain text mode 

    In the constructor:
    Qt Code:
    1. m_qIterator = m_qLinkedList.begin();
    To copy to clipboard, switch view to plain text mode 

    I don't really know if this iterator will be persistent and if I can use it to insert, remove, ...
    Will try it.

    Thanks,
    Òscar Llarch i Galán

Similar Threads

  1. QLinkedList and iterators
    By eu.x in forum Newbie
    Replies: 1
    Last Post: 19th April 2007, 19:38
  2. iterator
    By mickey in forum General Programming
    Replies: 6
    Last Post: 23rd May 2006, 10:28
  3. Std iterator as private member variable
    By Michiel in forum General Programming
    Replies: 5
    Last Post: 21st April 2006, 15:27
  4. ::iterator
    By mickey in forum General Programming
    Replies: 2
    Last Post: 20th March 2006, 22:05
  5. convert iterator
    By mickey in forum General Programming
    Replies: 8
    Last Post: 20th March 2006, 21: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.