C++ (Qt)main_win->removeDockWidget( left_dw );main_win->removeDockWidget( right_dw );main_win->addDockWidget( Qt::LeftDockWidgetArea, right_dw );main_win->addDockWidget( Qt::RightDockWidgetArea, left_dw );