[PyKDE] None and QString()

Phil Thompson phil at river-bank.demon.co.uk
Fri Nov 16 20:44:02 GMT 2001


Boudewijn Rempt wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I think I must have missed something, somewhere - is it a PyQt
> or a Qt decision to no longer accept None for an empty QString,
> for instance in
> 
>    fileName = QFileDialog.getOpenFileName(None, None, self)
> 
> vs.
> 
>    fileName = QFileDialog.getOpenFileName(QString(), QString(), self)

PyQt decision, but not intentional. Strictly I think you should use...

     fileName = QFileDialog.getOpenFileName(QString.null, QString.null,
self)

...but because...

     fileName = QFileDialog::getOpenFileName(0, 0, this);

...works in C++ I'll restore the behaviour for the final release of PyQt
v3.0.

Phil




More information about the PyQt mailing list