Unsolved QT QCUSTOM plot flickering problem
-
As I already wrote you have a QTimer that is literally spamming the event loop to update your plot which is wrong. Do smart updates. Human eyes are still working at 24fps so there's not need to try to refresh your plot at light speed.
-
@SGaist actually the whole graph is updating .
individual point update not happening -
@SGaist if set my timer 100 there is no flicker.but when ever the array content changes graph also needs to change.that change not happening smoothly(transition form old values of array to new values array )
-
How much data are your receiving ?
How fast ?
What is it representing ? -
@SGaist I am reading line camera pixel values.
1.Each line is 2048 pixel (in the form RGB888)
2.The data are reading through ETHERNET(tcp/ip) protocal
3.I need to plot the graph(RGB) based on the received data.
4.Speed is 100mbps
5.its representing pixel intensity -
How are you bringing these data to your application ?
-
@SGaist Reading it from a line scan sensor .(interface :ethernet)
-
This post is deleted! -
@swansorter Graph points not changing from present points to updated points (smooth transition),instead the whole graph is changing
-
@swansorter said in QT QCUSTOM plot flickering problem:
@SGaist Reading it from a line scan sensor .(interface :ethernet)
I understand the hardware you are using, my question is what are you using at the software layer to get the data ?
From the looks of your code you are just replacing all the data so I don't know how you can expect a smooth transition.
-
testing purpose only i used two array .
if it is works then i ill updated to ethernet code(RTP Protocal) -
As I wrote before, you are literally replacing the values. If you want a smooth transition, you will have to write yourself the intermediate values to go from one list to the other.
-
@SGaist if use random generator it works fine
points.append(QPointF(k , qrand() % ((10 + 1) - 5) + 5));
if i replace array values its not working?
sir if have the code for intermediate values please share.i want to change the values of dynamically. -
@swansorter said in QT QCUSTOM plot flickering problem:
@SGaist if use random generator it works fine
points.append(QPointF(k , qrand() % ((10 + 1) - 5) + 5));How are you using that comparing to your array implementation ?
-
No just checked example program and implemented it .
Instead of array values i used that random generator. -
@SGaist each cycle array values are changing and and in random generator changes on evry cycle
-
You should rather concentrate on actual real data or at least use realistic test data. Using just two tables does not reflect reality and what you will get from your device.