qt layout销毁时会销毁其中的组件吗

2025-05-17 05:32:42
推荐回答(1个)
回答1:

不会,貌似所有的remove函数都是只是移除,并不会销毁
void QStackedWidget::removeWidget ( QWidget * widget )
Removes widget from the QStackedWidget. i.e., widget is not deleted but simply removed from the stacked layout, causing it to be hidden.
Note: Ownership of widget reverts to the application.