Hi,

បានសរសេរ Lukáš Lalinský:
> Keo Sophon wrote:
>   
>> Hi,
>>
>> Does anyone know how to detect which button (Save or Cancel) that a user 
>> clicks on savefile dialog (QFileDialog.getSaveFileName)?
>>
>> On the other hands, how can I display only the All Supported Files, for 
>> example (xml, html, odt, po)? 
>>     
>
> fileName = QtGui.QFileDialog.getSaveFileName(self, "", "", "All Supported 
> Files
> (*.xml *.html *.odt *.po)")
> if fileName:
>     # OK
>     print fileName
> else:
>     # Cancel
>     print "No file selected!"
>
> -Lukáš
>   
your solution is detecting the filename if it exist or not,  but not the
button (Save or Cancel).
Because if your filename isEmpty, either do you click OK nor Cancel;as
the result, you always get "No file selected"

Other solution?
da


_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to