When I draw a line with all zero values, I find the program very stuck. After searching, I found this bug.
In getoptimizedscatterdata(), there is the following code:
int dataModulo = qMax(1, qRound(intervalDataCount/(valuePixelSpan/4.0)));
When the floating-point number in qround is very large, it may return a negative integer, resulting in datamodulo always being 1 and eventually causing a stuck. My solution is as follow:
int dataModulo = qMax(1, ((intervalDataCount/(valuePixelSpan/4.0)) > INT_MAX)?INT_MAX:qRound(intervalDataCount/(valuePixelSpan/4.0)));