Releases: mottosso/Qt.py
1.3.2
Improved error messaging on missing DLLs when importing Qt.py.
# Before
Qt.py [warning]: ImportError: DLL load failed: The specified module could not be found.
# After
Qt.py [warning]: ImportError(QtXmlPatterns): DLL load failed: The specified module could not be found.
1.3.1
1.3.0
Updated QtCompat.wrapInstance
to closer mimic the behavior of sip.wrapInstance
when used with shiboken
, in that it'll find the closest superclass rather than always resort to QObject
.
This may, but shouldn't, affect the behavior of your code. One edgecase that comes to mind is if you've used type(myobject) == QObject
rather than isinstance(myobject, QObject)
in which case your test may now break. Hence I've updated the minor rather than the patch version of this release. If you spot anything else, feel free to raise an issue or submit a PR with a fix.
- See #349 for details
- Thanks @mitchellsimmons for this update!
1.2.6
1.2.5
New environment variable QT_PREFERRED_BINDING_JSON
added by @MHendricks to dynamically pick binding based on parent package.
Usage Author
- As a library author, self-host Qt by storing it along with your package, e.g.
mypackage.vendor.Qt
- Inform the user that most but not all bindings are supported such as PySide and PyQt4 only (e.g. in your README)
- Pray they see it
Usage User
- As a user, read a library's README
- If you see mention of which bindings are supported
- Add those bindings to your
QT_PREFERRED_BINDING_JSON
environment variable.
Python
import os
import json
os.environ["QT_PREFERRED_BINDING_JSON"] = json.dumps({
"pyblish.vendor.Qt": ["PyQt5", "PySide"],
"studiotool.vendor.Qt": ["PyQt4", "PyQt5"]
})
Cmd
set QT_PREFERRED_BINDING_JSON={"pyblish.vendor.Qt": ["PyQt5", "PySide"], "studiotool.vendor.Qt": ["PyQt4", "PyQt5"]}
Powershell
$env:QT_PREFERRED_BINDING_JSON='{"pyblish.vendor.Qt": ["PyQt5", "PySide"], "studiotool.vendor.Qt": ["PyQt4", "PyQt5"]}'
Bash
export QT_PREFERRED_BINDING_JSON={"pyblish.vendor.Qt": ["PyQt5", "PySide"], "studiotool.vendor.Qt": ["PyQt4", "PyQt5"]}
Now whenever Pyblish from .vendor import Qt
, it'll try and use PyQt5
whereas Studio Tool would try PyQt4
. This can help narrow the supported bindings of your library to some but not all of the 4 supported bindings, if your library doesn't support e.g. PySide2. Ideally of course, as a library author, you shouldn't need this and should always strive for support by all bindings where possible.
See #335 for details.
1.2.4
1.2.3
New mechanism for warning about members that are missing and supposed to be missing, currently only QtGui.QMatrix
.
If you discover or know about a member that isn't in Qt.py and shouldn't be, you can add a it to _missing_members
.
_missing_members = {
"QtGui": {
"QMatrix": "Deprecated in PyQt5",
"YOUR MEMBER": "Message to display whenever anyone tries to access it"
},
}
1.2.2
1.2.1
Cosmetic change only.
Support for Rez's version resolution algorithm, which puts pre-releases ahead of stable releases.