Hi,

Is related to that?
https://gis.stackexchange.com/questions/259751/fixing-headings-for-qgis-custom-widgets-in-qt-designer/259883#259883 ?

Regards.

Envoyé de mon smartphone BlackBerry 10.
De: Denis Rouzaud
Envoyé: jeudi 11 janvier 2018 19:18
À: Nyall Dawson
Cc: qgis-developer
Objet: Re: [QGIS-Developer] QgsDockWidget does not seem to work with loadUiType


"It's still on the list but it is low priority."

Le jeu. 11 janv. 2018 à 09:24, Denis Rouzaud <[email protected]> a écrit :

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

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

Reply via email to