I am attempting to switch from QDockWidget to QgsDockWidget with my Lat Lon
Tools plugin for QGIS 3.0. I am getting this error:

  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'

Normally what I do when I encounter these types of errors is to change the
custom widget lines of code from something like:

 <customwidgets>
  <customwidget>
   <class>QgsDockWidget</class>
   <extends>QDockWidget</extends>

*  <header>qgsdockwidget.h</header>*   <container>1</container>
  </customwidget>
 </customwidgets>

to

 <customwidgets>
  <customwidget>
   <class>QgsDockWidget</class>
   <extends>QDockWidget</extends>

*  <header>qgis.gui</header>*   <container>1</container>
  </customwidget>

This has always worked in the past, but it is not working for
QgsDockWidget. It still works for the other custom widgets. Is this a bug
or do I need to do something differently in my .ui code?

Thanks,

Calvin
_______________________________________________
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

Reply via email to