<div dir="ltr"><div><br></div><div>Hi all,</div><div><br></div><div>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)<br></div><div><br></div><div>Here is a description of the issue on PyQt mailing list</div><div><a href="https://www.riverbankcomputing.com/pipermail/pyqt/2017-October/039647.html">https://www.riverbankcomputing.com/pipermail/pyqt/2017-October/039647.html</a><br></div><div><br></div><div>Here is a part of the reply from Phil Thomson:</div><div><br></div><div><span style="color:rgb(33,33,33);font-size:13px">> 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).</span><br></div><div><span style="color:rgb(33,33,33);font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-size:13px">I just pinged Phil to get an update on this as he said he would fix it.</span></div><div><span style="color:rgb(33,33,33);font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-size:13px">Best wishes,</span></div><div><span style="color:rgb(33,33,33);font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-size:13px">Denis</span></div><br><div class="gmail_quote"><div dir="ltr">Le mer. 10 janv. 2018 à 18:02, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11 January 2018 at 07:37, C Hamilton <<a href="mailto:adenaculture@gmail.com" target="_blank">adenaculture@gmail.com</a>> wrote:<br>
> I seem to remember seeing something that said that QgsDockWidget should be<br>
> used rather than QDockWidget. I was trying it today, but it generates the<br>
> error below in this line of code.<br>
><br>
> FORM_CLASS, _ = loadUiType(os.path.join(<br>
>     os.path.dirname(__file__), 'ui/zoomToLatLon.ui'))<br>
><br>
> Has anyone had problems with this or should I not use QgsDockWidget and<br>
> stick with QDockWiget? I'm trying this on QGIS 2.99.<br>
><br>
> AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QgsDockWidget'<br>
<br>
It's not a PyQt class - it's in the QGIS gui library:<br>
<br>
from qgis.gui import QgsDockWidget<br>
<br>
Nyall<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div></div>