Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Subwindow can't move with mainwindow.

Subwindow can't move with mainwindow.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 319 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suym
    wrote on last edited by
    #1

    There are two widgets. Widget B is in widget A. And I set Widget B as Qt::Window, like a toolbar floating on widget A.
    The question is, when I move widget A, B will not follow it, even I rewrite the move event. Since the relative position of A and B doesn't change. So how can I deal with it? Or any other way to realize this function?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      That's not a "subwindow" but a top-level window with a parent. A "subwindow" is what in a QMdiArea.
      If you need widget B to move with widget A you should let it be a normal child widget, and handle the mouse "dragging" events on widget B if you need to move it inside widget A.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved