[QGIS-Developer] PyQt QtXmlPatters and QXmlQuery ?
Richard Duivenvoorde
rdmailings at duif.net
Tue Sep 29 05:05:02 PDT 2020
Hi,
Trying to port a plugin here from py2 to py3 the devs have used:
from PyQt4.QtXmlPatterns import QXmlQuery
then use:
QXmlQuery(QXmlQuery.XSLT20)
but.. in QGIS3 we tried to get rid of Qt-version dependency, so we encourage to use
from qgis.PyQt.QtCore import xxxx
etc
but (looking into my installs and trying in the python console
from qgis.PyQt.QtXmlPatterns import QXmlQuery
returns me a
ModuleNotFoundError: No module named 'qgis.PyQt.QtXmlPatterns'
BUT: if I do
from PyQt5.QtXmlPatterns import QXmlQuery
the class is successfully loaded
Should/Can I include QtXmlPatterns.py here:
https://github.com/qgis/QGIS/tree/master/python/PyQt/PyQt5
without issues? Or am I creating a new dependency then?
Regards,
Richard Duivenvoorde
More information about the QGIS-Developer
mailing list