I have two classes: class A and class B.
In class A, I have a private slot Refresh
which is called using QTimer every two seconds and helps in updating values in QTableView.
Class B is defined by QThread and in run
function I am taking data from the client with the help of sockets and all.
Now the issue is that when run
takes data from client then QTimer updates the table and thus updates in between without updating all the data. Sometimes it updates less and vice versa. This can be done if we sync in a way that as the data is taken the Refresh
function does it work. But how can I do this? Because Refresh
is of another class so I thought of a way to sync QTimer with sleep or a way by which I can call that function in class B only.