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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:06:15+00:00 2026-05-13T14:06:15+00:00

I have a glade gui, and I want to insert another object using a

  • 0

I have a glade gui, and I want to insert another object using a glade file as well.

When I do it as bellow (this is essentially what I am doing) the whole app hangs and the self.show() and maxes out the CPU at 100%. If I replace the first line of one’s init() with self.builder = gtk.Builder() then the app runs, I can set widgets, ie: set contents of entry’s, set and change the values of comboboxes. But I cant respond to signals, button clicks never call the handler.

In the real code the object two is set as a page in a note book, and I have multiple other pages, the gtk.main() is in the object that owns the notebook. All these work as expected, it’s just the object one that fails.

Any clues? I have tried calling self.builder.connect_signals() for every widget but it still fails to notice them.

class one(gtk.VBox):
 def __init__(self, builder):
        gtk.VBox.__init__(self)
        self.builder = builder  # if this is self.builder = gtk.Builder() app runs but widget signals go missing.
        self.builder.add_from_file("ui_for_one.glade")
     self.show()  # Endless loop here?

class two(object):  # This is the page in a notebook.   
 def __init__(self):
  self.builder = gtk.Builder()
  self.builder.add_from_file("ui_for_two.glade")
  self.some_container = self.builder.get_object("some_container")
  self.one = one(self.builder)
  self.some_container.pack_start(self.one, False, False)
  • 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-13T14:06:16+00:00Added an answer on May 13, 2026 at 2:06 pm

    Is there a good reason for using the same gtk.Builder object in two classes?
    This might be the cause of your problem. In your one class, you load a glade file but you never do anything with its widgets. Something like this should work:

    class one(gtk.VBox):
    
      def __init__(self):
        gtk.VBox.__init__(self)
        self.builder = gtk.Builder()
        self.builder.add_from_file("ui_for_one.glade")
        some_widget = self.builder.get_object("some_widget")
        self.add(some_widget)
        self.builder.connect_signals(self)
        # No reason to call self.show() here, that should be done manually.
    
      #Your callback functions here
    
    class two(object):  # This is the page in a notebook.   
    
      def __init__(self):
        self.builder = gtk.Builder()
        self.builder.add_from_file("ui_for_two.glade")
        self.some_container = self.builder.get_object("some_container")
        self.one = one()
        self.some_container.pack_start(self.one, False, False)
        self.some_container.show_all() #recursively show some_container and all its child widgets
    
        self.builder.connect_signals(self)
    

    For more info, check out these Glade tutorials.

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

Sidebar

Ask A Question

Stats

  • Questions 312k
  • Answers 312k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The normal quote character is the back-quote - eg create… May 13, 2026 at 10:30 pm
  • Editorial Team
    Editorial Team added an answer Do I need to keep these Users in my new… May 13, 2026 at 10:30 pm
  • Editorial Team
    Editorial Team added an answer You can do this pretty easily via window.location.pathname parsing: var… May 13, 2026 at 10:30 pm

Related Questions

I want to display a simple GIF image in a VBox using GTK+ from
I am working on a desktop application in PyGTK and seem to be bumping
I'm using Glade-3 for my GUI design, but I keep hitting this problem. I
I am trying to make a gui with Glade 3 (gtk) and ruby but
As far as I can tell, all GUI toolkits are basically the same. They

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.