QWidget *main_widget = new QWidget;QVBoxLayout *layout = new QVBoxLayout;layout->addWidget(widget); layout->addWidget(Main_Buttons); // Main_Buttons и widget объявляются ранее в кодеmain_widget->setLayout(layout);dockWidget->setWidget(main_widget);dockWidget->setMinimumSize(main_widget->minimumSize());dockWidget->updateGeometry();
MainButtonsClass *Main_Buttons = new MainButtonsClass;