No, no. Your QChartView should be a child of MainWindow. See that there are two QChartView constructors; in Line 21 of your code above use the one that takes a QWidget * parent argument and use "this" (your MainWindow instance) as the value for "parent".How to create QChartView as a parent of MainWindow?
Bookmarks