hi all,
I added a QCustomplot and some pushbuttons in QWidget. so the qcustomplot and pushbuttons are children of QWidgets.
Now I want to draw two lines in Qcustomplot moving with mouse. so I used update() function in QWidget class to redraw the lines in paintEvent(). the code is like this:
void widget::mouseMove(QMouseEvent*) { this->update(); } void widget::paintEvent(QPaintEvent *) { /*draw to lines*/ }
so when I move mouse ,the widgets will redraw. the result is the pushbutton in QWidgets can not display normal!!