[PyQt] Bug in QFileDialog
uvemas at gmail.com
Thu Dec 9 18:57:03 GMT 2010
On 2010-12-09 Baz Walter <bazwal at ftml.net> said:
> On 09/12/10 18:01, Vicent Mas wrote:
> > On 2010-12-09 Baz Walter<bazwal at ftml.net> said:
> >>> but it means that there is still a bug: in the doItWrong function of my
> >>> script the setFileMode call doesn't reset the FileName label to a
> >>> default value. So it seems that I'll end writing my first C++ code
> >>> (using Antonio's code as a guide) and sending a bug report to Nokia.
> >> i can't reproduce this.
> >> if i comment out the call to setFileMode in the doItWrong function, the
> >> label of the Accept button is set to "accept label"; otherwise it is
> >> reset to "Open".
> >> so it looks like everything works as per the qt docs.
> >> (this is using: python 2.7.1, qt 4.7.1, sip 4.11.2, pyqt 4.8.1)
> > No, accordingly to the docs the setFileMode sets two constants: FileName
> > and Accept. What I say is that the FileName constant is not being reset.
> > At least here.
> yes, sorry - i missed that you were now referring to the FileName label.
> however, it appears that this may actually be a documentation bug.
> QFileDialog has an internal property "fileNameLabelExplicitlySat" [sic]
> which is set to true when using setLabelText.
> the setFileMode method checks this property when deciding whether to
> reset the FileName label. there is no corresponding property for any of
> the other labels.
use the force, read the source.
Thanks for the info. So if no more news arrive it seems that what should be
reported to Nokia is a documentation bug (I've lost a great opportunity for
writing C++ code. That's a pitty ;-)
Share what you know, learn what you don't
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the PyQt