I have a QWidget object, with a cancel button connected to a cancelClicked() slot. this slot is doing a widget->close(). Earlier, when i create this widget, I also set attribute:
Qt Code:
  1. this->setAttribute(Qt::WA_DeleteOnClose) ;
To copy to clipboard, switch view to plain text mode 
.

On click on cancel, the most part of the widget closes, but it remains an ugly header (or ribbon if you prefer), with on the left the words "Form" and on the right a cross to close the widget. If i click on the cross, this ribbon disappears.

Do you know how to programmatically delete this ribbon as well ?

Thanks