PDA

View Full Version : Qt equivalent of some Win32 code in OnMouseMove (mouseMoveEvent in Qt)



perdrix
3rd July 2020, 11:25
In the OnMouseMove() mf of a Win32 custom control which I am re-writing for Qt, there is some code that looks like this:



//----- Get the original erase area -----//
getMarkerRgn(&oldrgn);

//----- Draw the markers -----//
:
:
getMarkerRgn(&newrgn);

erasergn.CreateRectRgn(0,0,0,0); //Dummy rgn
erasergn.CombineRgn(&oldrgn, &newrgn, RGN_DIFF);

dc.FillRgn(&erasergn, &brush); // Background colour brush

The idea being to erase the previously drawn markers after the new ones are drawn

What should I be doing in Qt?

PS is there any Qt equivalent of the Windows OnEraseBackGround() ?
PPS only three weeks Qt experience so far so please be gentle!

Many thanks
David