Thursday, May 2, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1625  / 1 Year ago, thu, april 6, 2023, 12:10:19

I have just downloaded Quickly, created a new project, set up simple GUI and created new dialog (quickly add dialog create (as you can see, I called it create)). I already have click handler in the main window but I don't know how to open my CreateDialog from there.



P.S. I am new to PyGTK, Glade and Quickly but I am not new to programming overall.


More From » application-development

 Answers
1

First you need to get a hold of the dialog gui object. If I remember correctly, quickly uses glade for the gui and then loads it via the GtkBuilder, so. Get the dialog gui object from the builder



dia = self.builder.get_object('the_name_of_the_dialog_in_glade')



and then you can run it



return_value = dia.run()



the return_value will be a code that corresponds to which button was pressed (which you can change your self in glade) or another code to tell you if the window was destroyed.



Hope it helps.


[#38692] Thursday, April 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
montwim

Total Points: 103
Total Questions: 112
Total Answers: 120

Location: Vietnam
Member since Mon, Mar 14, 2022
2 Years ago
;