GTK4PythonTutorial
GTK4PythonTutorial copied to clipboard
'gi.repository.Gtk' object has no attribute 'FileDialog' error
trafficstars
Things are going along hunky-dory in this rather nice tutorial until I hit the 'Adding a file chooser' section. I then see the error mentioned in the title. Below is the snippet with the pre and post couple of lines. What am I missing other than the "FileDialog attribiute"? Thanks.
self.open_button.connect('clicked', self.hello)
self.open_button.set_icon_name("document-open-symbolic")
self.open_dialog = Gtk.FileDialog.new()
self.open_dialog.set_title("Select a File")
def show_open_dialog(self, button):
self.open_dialog(self, None, self.open_dialog_open_callback)