0

at last I started a simple project (you tube video downloader) in quickly , But got stucked . I added youtube url entry dialog using quickly add dialog command and ;linked it to new button . How return url to the main window ? I don't have any previous experiance with python

My program now look like this

enter image description here

1 Answer 1

2

Depending on your code, you could do something like this:

url = None
dialog = UrlDialog()
response = dialog.run()
if response == Gtk.ResponseType.OK:
    url = dialog.get_url()
dialog.destroy()

Then just implement a get_url() method or url property in your dialog class:

class UrlDialog(Gtk.Dialog):
    # Init etc...

    def get_url(self):
        return self.urlentry.get_text()
1
  • Thanks now it shows File "/home/aboobacker/mytube2/mytube2/Mytube2Window.py", line 34, in on_newurlbutton_clicked url = dialog.get_url() File "/home/aboobacker/mytube2/mytube2/NewurlDialog.py", line 61, in get_url return self.newurlentry.get_text() AttributeError: 'NewurlDialog' object has no attribute 'newurlentry' What does it mean ?
    – Tachyons
    Jul 2, 2012 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .