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. How do I open a Window so that...
Forum Updated to NodeBB v4.3 + New Features

How do I open a Window so that...

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.3k Views 1 Watching
  • 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
    S0nnen
    wrote on last edited by
    #1

    Whenever I open a window using:
    Window newWindow;
    newWindow.setModal(true);
    newWindow.exec();
    or
    newWindow = new Window(this);
    newWindow->show();

    I either end up with a window that, so that I can't switch focus back to the parent window. Or I end up with a window, where I can switch focus back to the parent window. But the child window will always be on top. What I want is this:
    I will be able to switch focus between the windows.
    The window that is in focus will be on top.
    If the parent window is closed, then so will the child window
    Only one instance of each window can be opened at a time.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BelenMuñoz
      wrote on last edited by
      #2

      Hi!!
      I can only help you with that point:

      [quote author="S0nnen" date="1358314033"]If the parent window is closed, then so will the child window
      [/quote]

      In my last project I did that including the second window as an attribute of the main window, so, you can change the "close" method to include the function secondWindow->close().
      I hope it may help you.

      Regards.

      Me casé con un enano pa jartarme de reí.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sam
        wrote on last edited by
        #3

        If you create the child window with the parent as parent window, so when the parent window is closed it will close all the child windows as well.

        1 Reply Last reply
        0

        • Login

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