Dear yogeshm02
Many thanks to You! It's unbelievable, getting a working solution to my problem in such a short time
Following Your advice, I added three lines of code:
void MainWindow::replaceDockEquipment(ParameterTree* equipment)
{
ParameterTree* old = qobject_cast<ParameterTree*>(dockWdgtEqmt->widget());
if (equipment != old) {
if (old)
old->setParent(0); // in memorial yogeshm02 (Qt Center Forum)
equipment->setParent(dockWdgtEqmt);
dockWdgtEqmt->setWidget(equipment);
dockWdgtEqmt->update();
}
}
void MainWindow::replaceDockEquipment(ParameterTree* equipment)
{
ParameterTree* old = qobject_cast<ParameterTree*>(dockWdgtEqmt->widget());
if (equipment != old) {
if (old)
old->setParent(0); // in memorial yogeshm02 (Qt Center Forum)
equipment->setParent(dockWdgtEqmt);
dockWdgtEqmt->setWidget(equipment);
dockWdgtEqmt->update();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks