Home > Mobile >  Qt receive serial data and draw waveform interface card problem more and more
Qt receive serial data and draw waveform interface card problem more and more

Time:10-10

Written in QT a can show a serial port receives the data and the data from the dynamic waveform of the interface, use the QWT controls, according to a serial port data I use the QTextBrowser controls, and in every 5 s will be automatically deleted QTextBrowser data, but the interface is more and more CARDS, excuse me everybody, this is what happened?

CodePudding user response:

Feeling is the memory leak problem, it is recommended that manual release partial memory?

CodePudding user response:

QTextBrowser shows too much data, it is suggested that reduce the number of data,

CodePudding user response:

Drawing recommended QCustomplot, can draw a lot of points,
Second is to use multithreading, after all, always refresh image, this will account for a lot of memory, to create a new thread for drawing,

CodePudding user response:

2 d drawing, the Qwt, last time these are reference method, and then is a serial port has been receiving data don't all on the drawing control, only increase don't reduce, is bound to slow, shows a few minutes or several hours, for example, set a maximum limit, go beyond the limit will reduce the back of the data, quite to maintain a queue does not exceed you set the maximum limit

CodePudding user response:

QWT data if too much do card, can consider to take too much
  •  Tags:  
  • Qt
  • Related