[Qt-interest] QStackedWidget, ownership and removal

Ramesh ramesh.bs at robosoftin.com
Mon May 24 11:48:48 CEST 2010


The solution for your problem
http://stackoverflow.com/questions/2506625/how-to-delete-a-widget-from-a-sta
cked-widget-in-qt

you need to delete the widget manually.. Remove widget will just removed
from the stack.
But it wont delete

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Bruce Cran
Sent: Monday, May 24, 2010 3:07 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QStackedWidget, ownership and removal

Hi,

I'm slightly confused by the QStackedWidget documentation. addWidget
apparently transfers ownership of the widget to the QStackedWidget, and
removeWidget retains that ownership. So that appears to suggest that
the application can't delete the object, and the QStackedWidget will
only hide it, not delete it. Does the application actually take
ownership back when removeWidget is called and that when delete'd it
will be removed entirely from the QStackedWidget?

--
Bruce Cran
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list