0

I have a parent window that has a QStackedLayout layout, using QStackedLayout::All mode, with a QOpenGlWidget at the bottom to render the video.

The top layer is a custom QWidget C that rewrites the mouse event.

When the mouse moves, will update to update the interface, specify the update area?

Such as update (QRect (0,0,20,30)), but when the underlying QOpenGlWidget calls update () (no specified refresh area, the default is the entire Widget) to refresh Interface, I get the Rect from C's paintEvent is not QRect (0,0,20,30), but the whole width and height of C, is there any way to solve it?

this is parent Widget this is a Contanier, it have a customwidget this is Container, pWidget in the previous image, The red part is customWidget C this is customWidget C, override mouse events customWidget C, override paintEvent to draw Graphics

KeepSmile
  • 1
  • 1

0 Answers0