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 1019801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:04:10+00:00 2026-05-16T11:04:10+00:00

Problem: Widget ‘A’ is a toplevel window that is displayed after a button click

  • 0

Problem: Widget ‘A’ is a toplevel window that is displayed after a button click in MainWindow ‘B’. How do I assign a handler to handle the signal sent back after the ‘X’ along the window border of Widget ‘A’ is clicked (see below for current implementation)?

def on_mainWindow_B_button_clicked(self, widget):
     self.widget_a.show()

def on_widget_a_destroy(self, widget): #this is the handler I have right now yet after it's called and widget.a closes and 'on_mainWindow_B_button_clicked' is called for the second time none of widget.a's children appear in the new window
     widget.hide()
  • 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-16T11:04:10+00:00Added an answer on May 16, 2026 at 11:04 am

    The handler for the delete_event signal must return True in order to stop the Window being permanently destroyed on closing.

        self.widget_a.connect('delete_event', self.on_widget_a_delete)
    
    def on_widget_a_delete(self, widget, event):
        widget.hide()
        # do something
        return True
    

    If you only want to have the window hide, there’s a builtin shortcut you can use:

    self.widget_a.connect('delete_event', self.widget_a.hide_on_delete)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem uploading with primefaces upload widget. After some investigation I noticed that
PROBLEM: I am hosting a widget on a client's website that will be different
I am having problem filtering the mousePressEvent with installEventFilter MyTestxEdit is a widget that
I have a problem that I have a widget that needs to make a
The problem is that I am recreating the social media widget/icons on http://about.me/bluedaniel (thats
I developed a Android-Homescreen-Widget and got a weird problem: The Open-Button in the Market
See the sample widget at http://jsfiddle.net/4B2Bc/ The problem is that the image and the
My problem is that in my Widget class i've the following declaration: MouseEvent* X;
I develop a widget based on ViewGroup and my problem is that I need
I'm trying to create a form that has an expandable widget. The problem is

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.