The code ....
I cant show the real code, the constructor builds a lot of things. I show you the skeleton. I hope it will help. I tell you all the proccess, in case of it be interesting.
Qwidget_A, is currently showed:
I have a Qpushbutton to load QWidgetB.
And QwidgetB has inside it a 'float_widget', placed with Designer.
>>a_float_widget is a simple widget, but with the capability of be moved,and/or to move severally its parent.
Ok, I put some elements from QwidgetB inside the float_widget. Hide the other elements, adjust the size of float_widget and finally adjust the size of Qwidget B it self. Inside float_widget I have :
flags = Qt::SplashScreen;
this->parentWidget()->setWindowFlags(flags);
flags = Qt::SplashScreen;
this->parentWidget()->setWindowFlags(flags);
To copy to clipboard, switch view to plain text mode
Ok, All works fine. I can move the 'window' using the float_panel (itself moves its parent). (Yes, I could to do this reversed, create a_panel and place inside it the widgetB, but I prefere to control QWidgetB ).
Ok, I have for this float_widget a method to create and insert generic custom buttons. (another custom widget with subclased paintevent and mouseevents. )
So, I have inside QWidgetB constructor:
ui->a_panel_flot_mod->w_add_button("close",WW::icon_close, this, SLOT(w_close_panel()));
ui->a_panel_flot_mod->w_add_button("close",WW::icon_close, this, SLOT(w_close_panel()));
To copy to clipboard, switch view to plain text mode
Inside QWidgetB::w_close_panel() I have
this->close();
this->close();
To copy to clipboard, switch view to plain text mode
When I press the 'button', the Q_WidgetB::w_close_panel() is right called. But everything (the float_widget and the QwidgetB ) remains being visible.
Maybe I have to close another elements before the main ?
What about disconnect ? Have I to disconnect things ?
I hope do you understand what I have described
Thanks
Bookmarks