How to move 2 separated QWidget synchronously by dragging one of them?
Unsolved
General and Desktop
-
Hi
How sync would like it to be
Like they move on same time as glued together
or first u move the main window and when
u release the other window will jump in place`?
For last case you could use the
http://doc.qt.io/qt-5.5/qmoveevent.html#details
and then just move the other widget the same. -
@EpicLoyd
Hello,
Probably the most reliable way to do that is to handle each widget's move events (see @mrjj's link) and callQWidget::move()
for the other widget. You might want to stop the issuing's widget move events from being processed in the meantime, otherwise you'll probably get terrible "jitter".Kind regards.