Feature #2396
closedAutomatically delete widget
0%
Description
The recommendation is to use WMessageBox asynchronously. This implies there is an object that must be deleted. For a simple error message with only an OK button, I'd not really want to keep a pointer to the messagebox around in my object and connect to the single Ok button's click merely to delete it. The latest C standard closures would alleviate this slightly as you at least don't need to define a separate special method for this in your class that might need the messagebox and also not retain the pointer due to the same scope the closure can be written in. However, I don't have the luxury to use the latest C standard yet. My question is: Is it possible to add something similar to Qt delete-on-close flag to Wt ? It is typically called in QWidget derivative constructor like so:
setAttribute(Qt::WA_DeleteOnClose);
Qt framework will now delete this widget when it is no longer displayed i.e. closed
Updated by Koen Deforche about 11 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.2
Updated by Koen Deforche almost 11 years ago
- Status changed from InProgress to Resolved
Added WPopupWidget::setDeleteWhenHidden(bool)
Updated by Koen Deforche almost 11 years ago
- Status changed from Resolved to Closed