Results 1 to 5 of 5

Thread: lifetime of foreach

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    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: lifetime of foreach

    This code won't compile.

    If you put "delete le1" inside the loop, it would delete the object pointed by le1 so effectively all line edits would vanish from qw.
    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:

    BalaQT (4th March 2010)

Similar Threads

  1. Replies: 1
    Last Post: 27th February 2010, 10:33
  2. Replies: 2
    Last Post: 6th February 2010, 16:31
  3. Foreach performance
    By jano_alex_es in forum General Programming
    Replies: 2
    Last Post: 17th November 2009, 13:26
  4. QTimer lifetime
    By milend in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2008, 20:33
  5. Expected lifetime of QModelIndex?
    By Ishark in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:18

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.