I seem to remember seeing something that said that QgsDockWidget should be
used rather than QDockWidget. I was trying it today, but it generates the
error below in this line of code.
FORM_CLASS, _ = loadUiType(os.path.join(
os.path.dirname(__file__), 'ui/zoomToLatLon.ui'))
Has anyone had problems with this or should I not use QgsDockWidget and
stick with QDockWiget? I'm trying this on QGIS 2.99.
AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QgsDockWidget'
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 336,
in startPlugin
plugins[packageName] = package.classFactory(iface)
File
"C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\latlontools\__init__.py",
line 2, in classFactory
from .latLonTools import LatLonTools
File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File
"C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\latlontools\latLonTools.py",
line 7, in
from .zoomToLatLon import ZoomToLatLon
File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File
"C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\latlontools\zoomToLatLon.py",
line 17, in
os.path.dirname(__file__), 'ui/zoomToLatLon.ui'))
File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\__init__.py",
line 203, in loadUiType
return (ui_globals[winfo["uiclass"]], getattr(QtWidgets,
winfo["baseclass"]))
AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QgsDockWidget'
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer