Are there existing ways to move several instances of QWidget simultaneously, without jittering?
-
I have several instances of QWidget objects. One of them is a chief widget, rest are the child-widgets.
When I move the chief widget all child-widgets should move on the same offset.
I tried to implement it in two ways:- In the chief widget call installEventFilter() for each child-widgets and move controlled for QEvent::Move event.
- Override void moveEvent(QMoveEvent* event) in chief-widget and call move for each child-widgets.
It works, but I observe the jittering when child-widgets move in both cases.
I suppose it happens due to the not-synchronous widgets redrawing.
Is it possible to solve this problem with special Qt-tricks? -
@nen777w
I admit I have not tried, but if you mean they others are child widgets of the "chief" widget and you move that, I would have expected the child widgets to move with it, maintaining their relative positions. You say they do not? Are you using layouts to position children within parent or not? -
Hm....!
Interesting found!
If I call for the child-widgetsetWindowFlags(Qt::ToolTip);
the jittering disappears. It looks like it helps to synchronize widget painting.
Or even better:Qt::Window|Qt::FramelessWindowHint
p.s.
My fault.
The problem is not solved.
I played with that and found that these flags do not eliminate jittering completely, they just make it less obvious.