[PyQt] PyQt5 enhancement request: auto-convert fileutils.Path to str or QString

Phil Thompson phil at riverbankcomputing.com
Thu Feb 5 19:26:46 GMT 2015


On 05/02/2015 5:51 pm, Alan Ezust wrote:
> It would be nice if when someone accidentally passes in a Path object 
> to a
> Qt method (like a Pixmap constructor) that it would auto-convert that 
> to a
> QString. Currently, Qt classes just silently fail to work when given a 
> Path
> instead of a python str.

The silence is a bug which should be fixed in tonight's snapshot. When 
using a Path you should just call str() on it before passing to the 
QPixmap ctor.

Thanks,
Phil


More information about the PyQt mailing list