Results 1 to 3 of 3

Thread: [SOLVED] Automatic children freeing for objects derived from QObject

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    160
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    33
    Thanked 1 Time in 1 Post

    Default Re: Automatic children freeing for objects derived from QObject

    Well...

    Unless i explicitely delete pLocalLister, i never get destructor debug from my objects.
    Let me summarize how they are made:
    Qt Code:
    1. class IFilesLister : public QObject {
    2. Q_OBJECT
    3. public:
    4. IFilesLister(void);
    5. virtual ~IFilesLister(void);
    6. // The following method calls "DoFetchContent" which is virtual...
    7. bool FetchContent(const CNodeDesc& cParent, QObject* pUserData=0);
    8. protected:
    9. virtual bool DoFetchContent(const CNodeDesc& cParent, QObject* pUserData) = 0;
    10. };
    To copy to clipboard, switch view to plain text mode 

    And then:

    Qt Code:
    1. class CFilesLister_File : public IFilesLister {
    2. Q_OBJECT
    3. public:
    4. CFilesLister_File(void);
    5. CFilesLister_File(const QString& cBasePath_p);
    6. virtual ~CFilesLister_File(void);
    7. protected:
    8. virtual bool DoFetchContent(const CNodeDesc& cParent, QObject* pUserData);
    9. };
    To copy to clipboard, switch view to plain text mode 

    So, what am i doing wrong here?

    [EDIT:] Wooops sorry my misstake, my objects don't "register" to their parent
    Sorry for this time.

    Thanks!
    Pierre.
    Last edited by wysota; 7th December 2006 at 00:08. Reason: reformatted to look better

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.