Results 1 to 6 of 6

Thread: How to mix QScopedPointer with QPointer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Aug 2010
    Posts
    22
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to mix QScopedPointer with QPointer

    Well, first I want Class1 to automatically delete m_apple on destruction, hence QScopedPointer.
    Then I also want m_apple to be automatically set to 0 when it is deleted, hence QPointer.
    Qt::WA_DeleteOnClose is set to true in Apple.

    Of course I can just "delete m_apple" in destructor, but I want to see if this works.
    Last edited by jezz; 13th April 2012 at 23:12.

Similar Threads

  1. QPointer gives compilation errors.
    By pkj in forum Qt Programming
    Replies: 9
    Last Post: 7th September 2011, 08:18
  2. Replies: 0
    Last Post: 22nd June 2010, 20:27
  3. How to cast QPointer<T> to QPointer<childT>
    By cafu in forum Qt Programming
    Replies: 4
    Last Post: 19th March 2010, 10:51
  4. Problem using QPointer
    By weaver4 in forum Newbie
    Replies: 8
    Last Post: 20th February 2010, 05:05
  5. QMutableVectorIterator and QPointer?
    By Scorp2us in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2008, 19:39

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.