On 11 January 2018 at 07:37, C Hamilton <[email protected]> wrote:
> 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'

It's not a PyQt class - it's in the QGIS gui library:

from qgis.gui import QgsDockWidget

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