Python/Gtk3 : How to add a Gtk.Entry to a Gtk.MessageDialog?
问题 Good morning, I'm trying to add a Gtk.Entry to a Gtk.MessageDialog . With the following code it seems that I added the Gtk.Entry but it's not visible on the dialog window (Python3/Gtk3) : #!/usr/bin/python3 from gi.repository import Gtk def get_user_pw(parent, message, default=''): dialogWindow = Gtk.MessageDialog(parent, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.OK_CANCEL, message) dialogBox = dialogWindow.get_content_area()