Results 1 to 2 of 2

Thread: Creating QFile Objects in a loop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Creating QFile Objects in a loop

    Quote Originally Posted by sky View Post
    First up when I look at this code I feel I am constructing too many QFile objects.
    You're only constructing one file at a time.
    The QFile will go out of scope (destroyed) every iteration.

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

    sky (3rd December 2010)

Similar Threads

  1. QtScript and creating non QObject based objects
    By tbscope in forum Qt Programming
    Replies: 1
    Last Post: 5th October 2011, 08:20
  2. QWizard creating objects dynamically
    By afflictedd2 in forum Qt Programming
    Replies: 5
    Last Post: 24th March 2009, 15:43
  3. creating/deleting Objects // memory leaks
    By janus in forum Qt Programming
    Replies: 4
    Last Post: 27th March 2008, 18:17
  4. QFile and Creating Files
    By Jingoism in forum Newbie
    Replies: 2
    Last Post: 28th July 2007, 17:11
  5. creating objects in a for()
    By phil_ in forum Newbie
    Replies: 3
    Last Post: 21st January 2006, 13:16

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.