I have a floating widget named float_panel; I create it from another Widget currently showed.

I show it so:
Qt Code:
  1. my_float_panel = new Ui_float_panel(this);
To copy to clipboard, switch view to plain text mode 

Ok, this float_panel has a button to close the Qwidget float_panel instance itself.
Inside the click_event of this button can I simply do: this->close() ?
(Now, I see (because I have a q_debug msg) I am inside the click_event, where I execute this->close(), but my widget remains visible .... )

Also I have tried to connect
Qt Code:
  1. connect(my_float_panel,SIGNAL(destroyed()),this, SLOT(float_panel_has_closed()));
To copy to clipboard, switch view to plain text mode 
But without success.

Any idea what I'm doing bad ? Thanks.