Qt hangs when re-scaling Y axis
-
I am a software engineer developing a test tool that receives real-time data from a radar system and plots it on a chart. This is a Qt Creator port of an existing tool that was originally written for LabWindows/CVI.
Because the data updates in real time, I need to be able to re-scale both the chart's X-axis (time) and Y-axis (data values) as the tool runs. I am finding that in certain circumstances, changing the maximum value of the Y-axis while the chart is active causes the application to hang. It doesn't give a typical "ended forcefully" or any other error message, it just stalls and shows the wait cursor until I go into Task Manager and end the application manually. I tried stepping through the application with the debugger but it doesn't give me any additional information.
It doesn't happen every time -- only when the user selects certain data fields to be plotted. And I've never had an issue with re-scaling the X-axis. That works fine.
I've tried this using both Qt 5 and 6. The same error happens in both versions. I'm running on Windows 10 but I've also seen it happen on Windows 7.
For now, I have a workaround where I keep the Y-axis min/max at 0-1 and re-scale the data as needed, but I'd like to know what could be causing this problem.
-
@richferrara said in Qt hangs when re-scaling Y axis:
It doesn't happen every time -- only when the user selects certain data fields to be plotted.
But then every time?!
How do you update the x-axis? ViasetRange
?
What else is happening while the axes are getting updated?Does the behavior change if you remove the axis and add a new one with updated scale? You could try that just to make sure that it's the axis and not some unwanted stuff happening with the data