Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtCharts runtime crashing when I attempt to rescale X and Y axis?
engsml last edited by engsml
I have a button that is supposed to scroll up and down the plot. I want to be able to rescale the axis when I do this, but my program keeps crashing at runtime when I click the button to scroll. My code is the following:
xMin += 10;
xMax += 10;
My xAxis variable is of type QValueAxis and my xMin and xMax are both ints. My chart is type QChart.
I am not sure what the error is since it crashes and doesn't display any error messages at compile time. Any help as to solving this issue would be much appreciated!
koahnig last edited by
Probably the best to compile in debug and use the debugger of your tool chain. It shall tell you where the crash is happening. From there you can continue to investigate.
Possibly one the pointers you are using is not properly initialized. That would be the first guess. Anything more detailed requires a crystal ball.
engsml last edited by
@koahnig Thank you! Yep it showed up as a segmentation fault in the debugger.