PyQt: Can't show PY variable in QT filedialog as initially parameter

Lee Harr missive at frontiernet.net
Thu Sep 11 16:01:22 EDT 2003


In article <43e3984e.0309110814.7d759662 at posting.google.com>, ulysses wrote:
> Hi,
> 
> I use PyQt 3.8 non-commercial version in win32. I get a big question.
> I Can't show PY variable in QT filedialog as initially parameter.
> 
> Code sample is following:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fileName="test.avi"
> 
> def saveSomething(aString):
>     dl = QFileDialog.getSaveFileName(aString, "*.*", self, "FileDialog")
> or 
>     dl = QFileDialog.getSaveFileName(QString(aString), "*.*",
>                                         self, "FileDialog")
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> these code can't show corrent string.
> 
> If I use string constant.
>    dl = QFileDialog.getSaveFileName("test.avi", "*.*", self, "FileDialog")
> 
> Dialog show it correctly.
> 


Maybe try:

dl = QFileDialog.getSaveFileName(str(aString), "*.*", self, "FileDialog")





More information about the Python-list mailing list