Results 1 to 4 of 4

Thread: Why some QT elements can be created as local and lives outside?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    56
    Thanked 1 Time in 1 Post

    Default Why some QT elements can be created as local and lives outside?

    This is a question that I have from time to time.
    In example, the analog clock example shows how you can create a Qtimer object inside analog_clock constructor and it lives until you close the app.
    The question, 'Why I have the impression that I see (somtimes) at Qt examples, objects that needs to be pointer based, created and deleted and some times I see objects created as 'locals' inside a method (and they works fine during the life of the prog..'
    Or Maybe I see this always at constructor and in this case they have a singular treatment ?

    I hope you understand this doubt.

    Thanks.
    Last edited by tonnot; 7th December 2011 at 20:30.

Similar Threads

  1. Ready to use QML elements
    By .:saeed:. in forum Qt Quick
    Replies: 0
    Last Post: 22nd February 2011, 16:25
  2. Where a QThread lives
    By Althor in forum Newbie
    Replies: 1
    Last Post: 5th July 2010, 09:07
  3. Ui Elements (QLineEdit) + QML
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2010, 16:04
  4. elements not updated
    By danesh in forum Qt Programming
    Replies: 2
    Last Post: 2nd April 2009, 08:35
  5. Elements out of Range!!
    By Kapil in forum Newbie
    Replies: 9
    Last Post: 3rd April 2006, 10: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.