Skip to content

Not sure how to pygubu please with inheritence and spawning new windows #233

Discussion options

You must be logged in to vote

Hello @coffeelover1010 thanks for trying pygubu.

This is my answer:

Code1

class PyGubuBuilder:
    def __init__(self, ui_filename):
        self.builder = pygubu.Builder()
        self.builder.add_resource_path(PROJECT_PATH)
        self.builder.add_from_file(PROJECT_PATH / ui_filename)
        self.toplevel1 = self.builder.get_object('toplevel1')  # <- Creating the toplevel 
        self.builder.connect_callbacks(self)                   # <- Connecting callbacks after all
                                                               #    widgets created. OK
                                                               # the button is connected and works

Code2

class PyGubuBuilder:
    def 

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@coffeelover1010
Comment options

@alejandroautalan
Comment options

@coffeelover1010
Comment options

Answer selected by coffeelover1010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants