void MainWindow :: setupPlottingArea(QCustomPlot *customPlot, QCustomPlot *depthPlot) {}

I have two Qcustomplot Widgets and i want the draggable function to work simultaneously. If i drag the customPlot widget the depthPlot widget will be dragged too automatically.Is there a way to do it?