Plan 1:
Pushbutton + scroolarea
Problem: 1. The mousemove instead of roller event not to be: mousemove, as it passed the pushbutton does not respond, setMouseTracking (true),
Scheme 2:
Lable + scroolarea
Question:
1. Rewrite mousmove events, judge whether the point of the click inside lable, thus click event determine,
But scroolarea lable control cannot get right below the position of the click event, has always been at the top of the lable control click event response,
Cutting, slide up and down trigger click and slide two events at the same time,
Now have no idea, so please the great god give directions, give a way of thinking,
Thank you very much
CodePudding user response:
Touch screen should use QTouchEventThe Qt: : open WA_AcceptTouchEvents attribute
When using QAbstractScrollArea -based widgets, you should enable the Qt: : WA_AcceptTouchEvents attribute on the scroll area 's viewport.
CodePudding user response:
Pushbutton oneself use QWidget implementation, mousemove triggers the click event, not trigger scroolarea sliding, directly after the press release for the trigger button click eventCodePudding user response:
Qt has special processing of touch, positive solution on the second floor