| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Note that the API for getSaveFileName is dependent upon which version of PyQt4 you have and requires a conditional selection of the appropriate function call.
|
I tested this with python-2.7 by doing the following: >>> import sip
>>> sip.setapi('QString', 2)
>>> import pylab
>>> pylab.plot([1,2])
>>> pylab.show()
and then clicking the save button on the toolbar. Without your patch, an error is raised. With the patch, it worked as desired. I think it is ok to merge. |
Sorry, something went wrong.
report compatible python2.7 Simplification of plotting simplification of report by forcing the output directory parameter
| Back | FazBrowse Home | New Git URL |
This is an attempt to support the change in the PyQt4 API of getSaveFileName(). There is now a _getSaveFileName variable that gets conditionally assigned either the old getSaveFileName method or a lambda function that wraps a call to the new getSaveFileNameAndFilter(). The lambda function was necessary so that only the filename part of the tuple returned by getSaveFileNameAndFilter() gets returned by the call to _getSaveFileName().
I have only tested the case where sip.getapi("QString") returns 1. I would greatly appreciate if others with different versions of PyQt4 test to make sure this works.