Sorry for the forward, i forgot to reply to tutor

On Mon, May 27, 2013 at 3:53 AM, Sunitha Misra <sunith...@gmail.com> wrote:

> self.fileDialog = QtGui.QFileDialog()
>
> QtCore.QObject.connect(self.toolButton,
> QtCore.SIGNAL(_fromUtf8("clicked()")), self.fileDialog.getOpenFileName)
>

i think the way youre doing it won't allow you to get the filename as
you are calling it through a signal.

Things you can do:

1) dont use self.fileDialog.getOpenFileName as a slot like you are
doing. Create a function and call it when the toolbar's button is
clicked, then in that function assign the filename to the return value
of self.fileDialog.getOpenFileName.

2) if the only thing your self.fileDialog is doing is responding to
the toolbar's button, don't create it at all. do what i said in #1 and
assign a filename variable to the full method of the dialog. What im
saying is there might be no need to create the self.fileDialog
instance variable at all.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to