Hi all, I think this is not currently feasible with PyQt5 at the moment (using QgsDockWidget as a top class for a UI and loading it with uic.loadUiType)
Here is a description of the issue on PyQt mailing list https://www.riverbankcomputing.com/pipermail/pyqt/2017-October/039647.html Here is a part of the reply from Phil Thomson: > I can confirm it is a bug, however the fix is non-trivial so it won't get fixed quickly. The fundamental problem is that the code has the assumption that all custom widgets will reside in the PyQt5 package hard-coded (but even then it's not quite as simple as that). I just pinged Phil to get an update on this as he said he would fix it. Best wishes, Denis Le mer. 10 janv. 2018 à 18:02, Nyall Dawson <[email protected]> a écrit : > 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
_______________________________________________ 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
