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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:11:16+00:00 2026-06-19T01:11:16+00:00

I have an application design done, without any useful stuff happening, but I have

  • 0

I have an application design done, without any useful stuff happening, but I have two windows. One is the main window, and one is the about dialogue. They are all on one .ui file from Glade.

When I open the About dialogue using Help>About (in my program), everything works. Closing it and opening it again using the same method results in a blank window.

Here is my code:

#! /usr/bin/env python3

from gi.repository import Gtk

class window():
    def __init__(self):
        self.builder = Gtk.Builder()

        self.builder.add_from_file("./personalinfo.ui")

        self.mainWindow = self.builder.get_object("mainWindow")

        self.mainWindow.connect("destroy", self.on_mainWindow_destroy)

        self.mainWindow.set_title("Persona")

        self.mainWindowMainBoxButtonBoxCancel = self.builder.get_object("mainWindowMainBoxButtonBoxCancel")

        self.mainWindowMainBoxButtonBoxCancel.connect("clicked", self.on_mainWindowMainBoxButtonBoxCancel_clicked)

        self.mainWindowMainBoxButtonBoxOK = self.builder.get_object("mainWindowMainBoxButtonBoxOK")

        self.mainWindowMainBoxButtonBoxOK.connect("clicked", self.on_mainWindowMainBoxButtonBoxOK_clicked)

        self.mainWindowMainBoxGenderBoxCombo  = self.builder.get_object("mainWindowMainBoxGenderBoxCombo")

        self.mainWindowMainBoxGenderBoxCombo.set_active(0)

        self.mainWindowMainBoxMenuFileMenuQuit = self.builder.get_object("mainWindowMainBoxMenuFileMenuQuit")

        self.mainWindowMainBoxMenuFileMenuQuit.connect("activate", self.on_mainWindowMainBoxMenuFileMenuQuit_activate)

        self.mainWindowMainBoxMenuHelpMenuAbout = self.builder.get_object("mainWindowMainBoxMenuHelpMenuAbout")

        self.mainWindowMainBoxMenuHelpMenuAbout.connect("activate", self.on_mainWindowMainBoxMenuHelpMenuAbout_activate)

        self.mainWindow.show_all()

    def on_mainWindow_destroy(self, widget):
        print("destroy: 'mainWindow'")

        Gtk.main_quit()

    def on_mainWindowMainBoxButtonBoxCancel_clicked(self, widget):
        print("clicked: 'mainWindowMainBoxButtonBoxCancel'")

        Gtk.main_quit()

    def on_mainWindowMainBoxButtonBoxOK_clicked(self, widget):
        print("clicked: 'mainWindowMainBoxButtonBoxOK'")

        Gtk.main_quit()

    def on_mainWindowMainBoxMenuFileMenuQuit_activate(self, widget):
        print("activate: 'mainWindowMainBoxMenuFileMenuQuit'")

        Gtk.main_quit()

    def on_mainWindowMainBoxMenuHelpMenuAbout_activate(self, widget):
        print("activate: 'mainWindowMainBoxMenuHelpMenuAbout'")

        self.aboutWindow = self.builder.get_object("aboutWindow")

        self.aboutWindow.set_title("About Persona")

        self.aboutWindowMainBoxButtonBoxOK = self.builder.get_object("aboutWindowMainBoxButtonBoxOK")

        self.aboutWindowMainBoxButtonBoxOK.connect("clicked", self.on_aboutWindowMainBoxButtonBoxOK_clicked)

        self.aboutWindow.show_all()

    def on_aboutWindowMainBoxButtonBoxOK_clicked(self, widget):
        print("clicked: 'aboutWindowMainBoxButtonBoxOK'")

        self.aboutWindow.destroy()

w = window()

Gtk.main()
  • 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-06-19T01:11:17+00:00Added an answer on June 19, 2026 at 1:11 am

    The About window isn’t created each time you call self.aboutWindow = self.builder.get_object("aboutWindow") it is created once when you load the UI file. So when you call self.aboutWindow.destroy() it destroys it forever, and the next time you try to display the window it no longer exists.

    Instead of destroying the window, you probably want to hide it instead self.aboutWindow.hide()

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

Sidebar

Related Questions

I am trying to design a simple application where in I have two entities
I am trying to design my application so that it has one main.xml layout
I have done some iPhone application development but still am relatively new at it.
I have an n-tier application design problem with Entity Framework 4. Server-side, my application
I have gwt-project that is comunication to database. Application design mvp pattern and view
i have an application in C#... Why Forms Design changes between XP sp2 and
I have a requirement to design an application which notifies/publishes, its subsystems to send
I have a requirement to design a Web Application which acts as a Facade
I have to develop an application with which my client will do visual design.
I have some sort of a design problem with my Django AJAX application. I

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.