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

Related Questions

I have a glade GUI and i'm using dome gtk.MessageDialog widgets created with pygtk
I'm using Glade-3 for my GUI design, but I keep hitting this problem. I
I have a simple GtkStatusBar created with glade,and want to add a simple message
I'm writing a python application that has a glade gui. Using subprocess to execute
I have a simple GUI build with Glade 3 and I have a gtk.Entry
Let's say I have a database column 'grade' like this: |grade| | 1| |
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
I'm working on a project that has a glade GUI. I need the main

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.