I am seeing them at once.
But my app response is low,
a. data which is in the buffer is read from a network at the same rate (500 items in 4 sec)
b. as and when i read single data into buffer i call update() on my widget to schedule a paint.
c. In the PaintEvent, i draw all the previous data (if any) and the current received data.
May be this is making my UI less responsive? I need to make it as a Thread but the QTCpSocket is used in many classes to send data, as far i understand the networking stuff should be limited to one QThread. So i think its little tricky , is there any example which does implement Network read and write as QThread?
My drawing is in a loop running till buffer size. It needs to draw 500 items in 4 secs (worst case), every time i receive a new data i have to redraw everything from the buffer along with the new data.
Even if i move to GraphicsView, reading from Network shouldnt be a Bottle Neck to me , should i use a Thread?
I am slowing moving to GraphicsView, but i have already developed much of code with QPainter, and trying hard to get best out of it.
I have attached two major files of my source
1. circlewidget.cpp : One that handles drawing
2. HmiGenric.cpp : This handles networking. (In this sendmsg() is called from different objects to send data) , this shouldnt be a hurdle to make this class as a Thread i guess.
Can you help me out?





Reply With Quote
Bookmarks