[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] =?utf-8?q?QFileDialog=2EgetOpenFileName_returns_a_tuple=3F?=
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2014-03-22 22:23:07
Message-ID: 12afbda978c9ecb0d836e2edf20ffc5b () www ! riverbankcomputing ! com
[Download RAW message or body]

On 22-03-2014 6:05 pm, David Cortesi wrote:
> In converting a PyQt4 program to PyQt5 I ran into an error because
> under PyQt5 (5.2), QFileDialog.getOpenFileName() returns a tuple of
> two strings. The first is either a path or null depending on the
> Cancel button, and the second always null.
>
> According to the C++ doc for getOpenFileName [1], the returned value
> is a string, and "If the user presses Cancel, it returns a null
> string." In the PyQt4 doc [2] it shows getOpenFileName returning a
> string (although it mentions that the three get...Filter methods
> return tuples).
>
> Was the behavior of getOpenFileName changed deliberately or is this a
> bug?

http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html#qfiledialog

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic