Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [Solved] Python Window Parent and Child Question - When Parent Closes, Child should Close too
Forum Updated to NodeBB v4.3 + New Features

[Solved] Python Window Parent and Child Question - When Parent Closes, Child should Close too

Scheduled Pinned Locked Moved Language Bindings
2 Posts 1 Posters 2.5k 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.
  • N Offline
    N Offline
    needhelp_gh
    wrote on last edited by
    #1

    Hi,

    Does anyone know how to set the parent of a window & when the parent closes, the child also closes if open as well?

    Here is my code:

    @# parent is defined
    ..
    ..
    child.setParent( parent, QtCore.Qt.Popup )@

    This is the best solution I could find...but it takes away the menu bar from the child window...

    Any ideas?

    Thanks!!


    http://abstrusegoose.com/432

    1 Reply Last reply
    0
    • N Offline
      N Offline
      needhelp_gh
      wrote on last edited by
      #2

      Solved it :)

      Code for anyone who needs it in the future:

      @parent.setAttribute(QtCore.Qt.WA_DeleteOnClose)@


      http://abstrusegoose.com/432

      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