Project

General

Profile

Actions

Feature #2396

closed

Automatically delete widget

Added by Tiaan Wessels about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/06/2013
Due date:
% Done:

0%

Estimated time:

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

Actions #1

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
Actions #2

Updated by Koen Deforche almost 11 years ago

  • Status changed from InProgress to Resolved

Added WPopupWidget::setDeleteWhenHidden(bool)

Actions #3

Updated by Koen Deforche almost 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF