[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: AttributeError: module 'PyQt6.QtQml' has no attribute 'QQmlExtensionPlugin'
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2021-05-14 14:07:14
Message-ID: a734f0c43a1cf0d8f0630065b144b199 () riverbankcomputing ! com
[Download RAW message or body]

On 12/05/2021 21:29, Kyle Altendorf wrote:
> Hi,
> 
> I'm working on adding Qt6 support to the pyqt-tools family of packages
> and am running into issues with QML plugins.  I get an error that
> seems, so far, to be coming not from my code.
> 
>   AttributeError: module 'PyQt6.QtQml' has no attribute 
> 'QQmlExtensionPlugin'
> 
> Searching the PyQt6 6.1.0 source for QQmlExtensionPlugin I get the
> following hits.
> 
> 
> PyQt6-6.1.0/examples/quick/tutorials/extending/chapter6-plugins/Charts/chartsplugin.py:from
> PyQt6.QtQml import qmlRegisterType, QQmlExtensionPlugin
> 
> PyQt6-6.1.0/examples/quick/tutorials/extending/chapter6-plugins/Charts/chartsplugin.py:class
> ChartsPlugin(QQmlExtensionPlugin):
> 
> PyQt6-6.1.0/qmlscene/pluginloader.cpp:PyQt6QmlPlugin::PyQt6QmlPlugin(QObject
> *parent) : QQmlExtensionPlugin(parent),
>   PyQt6-6.1.0/qmlscene/pluginloader.cpp:    // Get
> QQmlExtensionPlugin.  We do this after the import of the plugin to
>   PyQt6-6.1.0/qmlscene/pluginloader.cpp:            
> "QQmlExtensionPlugin");
>   PyQt6-6.1.0/qmlscene/pluginloader.cpp:    // QQmlExtensionPlugin.
>   PyQt6-6.1.0/qmlscene/pluginloader.cpp:                "%s does not
> contain an implementation of QQmlExtensionPlugin",
>   PyQt6-6.1.0/qmlscene/pluginloader.h:#include <QQmlExtensionPlugin>
>   PyQt6-6.1.0/qmlscene/pluginloader.h:class PyQt6QmlPlugin : public
> QQmlExtensionPlugin
>   PyQt6-6.1.0/ChangeLog:  Removed the internal QQmlExtensionPlugin 
> class.
> 
> I notice the last hit is the changelog entry saying that
> QQmlExtensionPlugin has been removed.  Yet, it is still referenced
> twice in `pluginloader.cpp`.
> 
> Is this a sufficient report or do I need to make up a minimal
> reproduction?  The apparent conflict between the source and the
> changelog seemed like it may be sufficient.  Maybe at least to lead to
> an explanation or resource I should read.

QQmlExtensionPlugin will be restored in the next snapshot.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic