c++ - Qt paintEvent() unnormally triggered -
i'm qt beginner.
so have mainwindow qslider
, qpixmap
. redefined paintevent( qpaintevent* event )
,
connect( slider, signal(valuechanged(int)), this, slot(centerchange(int)) );
with slot:
void mainwindow::centerchange(int value) { center = value; update(); }
so wanted repainte pixmap if slider's value changed. notice everytime when make mouse-in or mouse-out slider, repaint triggered. why happenning?
thanks.
paint event may triggered @ time underlying qt drawing system. should not assume paint event can triggered you. need change logic in app.
Comments
Post a Comment