[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Re: Savefile dialog (QFileDialog.getSaveFileName).
From:       kakada <hokkakada () khmeros ! info>
Date:       2006-08-23 4:32:36
Message-ID: 44EBDA64.1080309 () khmeros ! info
[Download RAW message or body]

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    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic