Quote Originally Posted by d_stranz View Post
No. If you don't want a memory leak, then create the QChartView with the MainWindow as a parent. The chart view will then be deleted when the main window is deleted, whether the chart view is visible or not.
Oh, ok. Can I ask you for simple example how to do that? How to create QChartView as a parent of MainWindow?