[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 10:04:32
Message-ID: 44EC2830.4080008 () khmeros ! info
[Download RAW message or body]

បានសរសេរ Lukáš Lalinský:
> kakada wrote:
> 
> > 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"
> > 
> 
> I believe the function doesn't let you to click OK with an empty file name.
> 
> http://doc.trolltech.com/4.1/qfiledialog.html#getOpenFileName
> 
> "If the user presses Cancel, it returns a null string."
> 
> 
It doesn't matter with getOpenFileName. The problem is with getSaveFileName

http://doc.trolltech.com/4.1/qfiledialog.html#getSaveFileName
 "return a file name selected by the user. The file does not have to exist." 

 if not self.fileName.isEmpty():
	#save 
	pass
else:
        QtGui.QMessageBox.information(self,self.tr("Information") ,self.tr("Please \
specify the filename to save to"))

Message box is always displayed if the filename is empty.

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