Viewport of QChartView contained within QDockWidget
Isn't dockWidgetContents of QDockWidget viewport of QChartView when the chartview is contained within the dock widget?
setting the dock widget contents as viewport of the chartview by the following code doesn't start the application, although the application output says 'Starting ...' without any error.
Normally one would add the chartview to the dock using
Did you check if ui->dockWidgetContents is Not null?
No, it's not null. I was trying it while looking for a solution to another post of mine (https://forum.qt.io/topic/72548/setting-size-of-qboxplot-horizontal-axis-slot). I am guessing that the method doesn't work as "QChartView is a standalone widget" (http://doc.qt.io/qt-5/qchartview.html#details). I am looking at Graphics View Framework for a solution (https://forum.qt.io/topic/72869/adding-and-drawing-qchart-to-qgraphicsscene).