I might have celebrated a bit prematurely, as the following code (adapted from the example in the QPolarChart Class doc.);
m_angularAxis = new QValueAxis();
m_angularAxis->setTickCount(9);
m_angularAxis->setLabelFormat("%.1f");
m_angularAxis->setShadesVisible(true);
m_angularAxis
->setShadesBrush
(QBrush(QColor(249,
249,
255)));
m_chart->addAxis(m_angularAxis, QPolarChart::PolarOrientationAngular);
m_angularAxis = new QValueAxis();
m_angularAxis->setTickCount(9);
m_angularAxis->setLabelFormat("%.1f");
m_angularAxis->setShadesVisible(true);
m_angularAxis->setShadesBrush(QBrush(QColor(249, 249, 255)));
m_chart->addAxis(m_angularAxis, QPolarChart::PolarOrientationAngular);
To copy to clipboard, switch view to plain text mode
craches the application. Looks like a segmentation error, although the error message just states that the application has crashed. The strange thing is that if I change the last line to
m_chart->addAxis(m_radialAxis, QPolarChart::PolarOrientationRadial);
m_chart->addAxis(m_radialAxis, QPolarChart::PolarOrientationRadial);
To copy to clipboard, switch view to plain text mode
there is no crash. So it seems to be related to PolarOrientationAngular. Running it in the debugger causes the debugger to crash, so I must be doing something really daft. I suspect it could be related to my CMakeListe.txt file,
find_package(Qt5Charts)
target_link_libraries(myApp Qt5::Widgets Qt5::Charts)
find_package(Qt5Charts)
target_link_libraries(myApp Qt5::Widgets Qt5::Charts)
To copy to clipboard, switch view to plain text mode
but I cannot see what it might me. Am I missing something?
Bookmarks