[PyKDE] Re: Savefile dialog (QFileDialog.getSaveFileName).
    Lukáš Lalinský 
    lalinsky at gmail.com
       
    Tue Aug  8 10:18:57 BST 2006
    
    
  
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áš
    
    
More information about the PyQt
mailing list