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. Move / attach dialog to parent ?
Forum Update on Monday, May 27th 2025

Move / attach dialog to parent ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 458 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    I can center the dialog on parent, actually on screen
    How can I attach the dialog to parent at a position so it can be moved when parent is moved?

    This is what I have so far

       QProgressDialog *QPD = new QProgressDialog (this);
        //Put the dialog in the screen center
        const QRect screen = QApplication::desktop()->screenGeometry();
        this->move( screen.center() - this->rect().center() );
      or
    
    this->move(screen.bottomLeft() - this->rect().center() );
        
    
    J.HilkJ 1 Reply Last reply
    0
    • A Anonymous_Banned275

      I can center the dialog on parent, actually on screen
      How can I attach the dialog to parent at a position so it can be moved when parent is moved?

      This is what I have so far

         QProgressDialog *QPD = new QProgressDialog (this);
          //Put the dialog in the screen center
          const QRect screen = QApplication::desktop()->screenGeometry();
          this->move( screen.center() - this->rect().center() );
        or
      
      this->move(screen.bottomLeft() - this->rect().center() );
          
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @AnneRanch I think, you're looking for some kind of integration of
      https://doc.qt.io/qt-5/qmdiarea.html#details


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        That is a great idea.
        Why coding the single relation between parent and child if I can rebuild the entire application "cascade style ".
        My objective to show the user the application progress, but I do no want to clutter the screen - hence I have been using this parent ->child scheme.
        Maybe your approach would also help cleanup my cumbersome "connect" implementation.

        Thanks

        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