Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Add QChartView to Qt Desiner like custom widget
bronstein87 last edited by bronstein87
Trying to add QChartView to qt designer. I making "Promote to...", then "Promote" QGraphicsView to QChartView.
But compiler gives an error in auto generated ui file:
*C:\Users\Shmeisser\Documents\build-DBHandler-Desktop_Qt_5_7_1_MinGW_32bit-Debug\ui_dbanalyzewindow.h:30: error: 'QChartView' does not name a type
What could be the problem? QT+= charts added in .pro file.
You've got the includes and class name wrong (it should be in a namespace).
In the promotion dialog make sure you set up the name/includes as follows:
Base class name: QWidget
Promoted class name: QtCharts::QChartView
Header file: QtCharts/QChartView
Global include: checked