Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

Fix a dialog's position relative to the parent window position



  • I want to "glue" a dialog to its parent, so that when the main window moves so does the dialog. What is the easiest way to implement that?



  • Hello,
    IMHO: store a pointer to "child window" (window that You want to move when parent moves) in parent widget, then overwrite mouseMoveEvent() / resizeEvent() and update position of child widget / window.


Log in to reply