
Originally Posted by
anda_skoa
The dockwidget emits a dockLocationChanged() when it undocked or redocked
Cheers,
_
Thank you ! I managed to do what I wanted, I will explain my technique here maybe it can help someone.
I Subclassed QDockWidget and then wrote a new SLOT:
void MyQDockWidget::changeOrientation(Qt::DockWidgetArea area) {
myLayout.clear;
switch(area) {
case Qt::TopDockWidgetArea:
//set my new layout here
break;
case Qt::BottomDockWidgetArea:
//set new Bot layout here
break
//do other layout if you need + default layout.
}
}
void MyQDockWidget::changeOrientation(Qt::DockWidgetArea area) {
myLayout.clear;
switch(area) {
case Qt::TopDockWidgetArea:
//set my new layout here
break;
case Qt::BottomDockWidgetArea:
//set new Bot layout here
break
//do other layout if you need + default layout.
}
}
To copy to clipboard, switch view to plain text mode
And then connected this slot with the mentionned above signal. It works great ! Thanks a lot.
I got to say that I am pretty suprised that it is not a native SLOT in Qt. I guess it is a rarely used function...
Bookmarks