结论
调用所有attach在该画布上的QwtPolarItem对象的draw函数,进行画布的更新。
代码验证
#include "mainwindow.h"
#include "D:/software/qwtpolar-1.1.1/src/qwt_polar_plot.h"
#include "D:/software/qwtpolar-1.1.1/src/qwt_polar_grid.h"
#include "D:/software/qwtpolar-1.1.1/src/qwt_polar_item.h"
#include <thread>
#include <mutex>
#include <windows.h>
#include <iostream>
#include <QThread>
using namespace std;
#include <QApplication>
class Data{
public:
Data(int x_,int y_):x(x_),y(y_){
}
// void operator()(){
// while(true){
// changeValue();
// cout << "hello" <<endl;
// Sleep(100);
// }
// }
void changeValue(){
// lock_guard<mutex> l(m);
x = qrand()%50;
y = qrand()%50;