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. Problem opening child window 2nd time

Problem opening child window 2nd time

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.4k 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.
  • M Offline
    M Offline
    matthellstrom
    wrote on last edited by
    #1

    I'm a newbie, and I'm trying to get a child window to work. I followed after the controls gallery example, and it doesn't work right, in my opinion. When you click the button to show the child window, it works fine, and if you click the button that says close it does window1.visible = false, which works fine.

    However, if instead of clicking the button you close the window using the x box on the window, it destroys the window and if you try to open it again it displays a window, but the controls are missing.

    This program initializes the child window before at the beginning of main.qml. It seems to me that if I initialized the window when I actually click the button, that would work, but I can't figure out how to do it.

    Any ideas?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      matthellstrom
      wrote on last edited by
      #2

      Can anyone give me any help on this one?

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qxoz
        wrote on last edited by
        #3

        Hi matthellstrom. Welcome to devnet.
        I tried catch bug that you described, but for me "controls gallery example" works fine.
        Probably it depends on Qt or OS version.
        OS: Win 7 64
        Qt: Qt 5.2 SDK Mingw
        What OS and Qt version do you use?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          matthellstrom
          wrote on last edited by
          #4

          OK qxoz can you try something for me? Could you bring up controls gallery example, click on the button to open the child window, then close the child window using the native operating system close (x) button instead of the button in the window. Then, open the child window again. You'll see that the controls are no longer in the child window.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qxoz
            wrote on last edited by
            #5

            Yes i try it and controls are still there.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              matthellstrom
              wrote on last edited by
              #6

              I don't know why mine isn't working. It seems that when I x out of the window, it destroys it then the controls don't show up when I open it again.

              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