QwtPlot::setAxesCount with num_axis > 2 causes segmentation fault.
The problem is probably generated in by QwtPlot::ScaleData::setAxesCount at line 101 where axisData gets resized.
QVector resize calls the default constructor of AxisData where a pointer to new QwtLinearScaleEngine gets saved in the scaleEngine variable.
The problem is that after storing a copy the AxisData Object in the Vector, the local copy of the object get destroyed and the scaleEngine is deleted in its destructor. The copy of the AxisData Object in the QVector referring to the deleted object is now invalid and causes segmentation fault when used or deleted (in the destructor or in setScaleEngine).
Anonymous
AxisData needs to be declared as Q_MOVABLE_TYPE to avoid the accidental new/delete calls. Fixed in the multiaxes branch
https://sourceforge.net/p/qwt/git/ci/98b87abb35034fafb425ef88f49584a30e09f550/