diff --git a/src/widgets/movementwidget.cpp b/src/widgets/movementwidget.cpp --- a/src/widgets/movementwidget.cpp +++ b/src/widgets/movementwidget.cpp @@ -27,7 +27,7 @@ { auto mainLayout = new QVBoxLayout; auto hBoxLayout = new QHBoxLayout; - auto newButton = new QPushButton(this); + QPushButton *newButton = nullptr; if (showHomeAndDisableWidgets) { newButton = new QPushButton(tr("Home All"), this); diff --git a/testclient/mainwindow.cpp b/testclient/mainwindow.cpp --- a/testclient/mainwindow.cpp +++ b/testclient/mainwindow.cpp @@ -270,7 +270,7 @@ void MainWindow::makeMoveDock() { - movementWidget = new MovementWidget; + movementWidget = new MovementWidget(true, this); connect(movementWidget, &MovementWidget::homeAllPressed, this, [this] { logWidget->appendLog(tr("Home All"));