The error is likely because the view needs the event loop to run so it can clean up things from the old chart and initialize from the new one. But by calling delete on the old chart instance, you pull the rug out from under it.
Try replacing "delete oldSignalData" with "oldSignalData->deleteLater()". This will result in the old instance being deleted, but not until the event loop has had a chance to run.
Bookmarks