Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:12:41+00:00 2026-05-13T16:12:41+00:00

I have one main Window and one non-modal Dialog. I suppose non-modal dialog should

  • 0

I have one main Window and one non-modal Dialog. I suppose non-modal dialog should close itself when I close main window. Instead if I open non-modal dialog, I should close manually both of them – if I close main window, non-modal dialog will remain, and I need to close it manually.

# App and main window
app = QtGui.QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec_())

class Window ... :
   ...
   def func:
      non_modal_dialog = NonModalDialog()
      non_modal_dialog.show()
   ...

What should I do so when I close main window all non-modal dialogs will be closed automatically?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:12:41+00:00Added an answer on May 13, 2026 at 4:12 pm

    Have you made the dialog’s parent widget the main window or at least some sort of descendant of the main window? If you do that then the dialog will go away when the window does. I’m familiar with Qt but not Python but it didn’t look like that’s the case from your code sample.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one WrapPanel With name PageWrapPanel In Main window of my WPF application
I have one main project and another project which is added as a subprojects.
We have one main project and two subprojects. One of the subprojects is the
I have one main class with several inherited members who all overload the same
I have one main parent swf that loads several other swfs. If something happens
I have one main outstanding issue, I know now how to databind to lists
I have one main array which is the returned data from a MySQL query
I have WPF Application where I have One main form and other user controls
I have a design of activities like this I have one main activity and
We are installing out program via inno setup. We have one main exe file,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.