Skip to content

error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function #370

Open

Description

@FabioLolix

Hi, I'm getting the error below with both v4.2.0 and from latest git when building from Arch Linux with Qt 6.12

About a week ago builded fine against Qt 6.11.2

If you need more info let me know

 com_trolltech_qt_gui_init.o ../../generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp:7:
../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:106:10: error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function
  106 | QString  resolveEntity(const QString&  publicId, const QString&  systemId) override;
      |          ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:13:
/usr/include/qt6/QtCore/qxmlstream.h:236:21: note: overridden function is ‘virtual QString QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’
  236 |     virtual QString resolveEntity(const QString& publicId, const QString& systemId) final;
      |                     ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.cpp:1:
../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:106:10: error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function
  106 | QString  resolveEntity(const QString&  publicId, const QString&  systemId) override;
      |          ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:13:
/usr/include/qt6/QtCore/qxmlstream.h:236:21: note: overridden function is ‘virtual QString QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’
  236 |     virtual QString resolveEntity(const QString& publicId, const QString& systemId) final;
      |                     ^~~~~~~~~~~~~
make[2]: *** [Makefile:1973: com_trolltech_qt_core4.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1994: com_trolltech_qt_core_init.o] Error 1
make[2]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions/PythonQt_QtAll'
make[1]: *** [Makefile:47: sub-PythonQt_QtAll-make_first] Error 2
make[1]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions'
make: *** [Makefile:101: sub-extensions-make_first] Error 2
==> ERROR: A failure occurred in build().

Activity

  1. usiems commented on Oct 27, 2026

    @usiems
    Contributor

    Sorry for the late answer, I lost sight of this issue.

    We didn't adapt the binding generator to Qt 6.12 yet. It seems the Qt API started to use the final keyword, and we need to teach the generator to not try to generate shell implementations for methods marked with final (shell implementations are needed to allow Python code to override virtual C++ methods). Since the method is marked final, it obviously isn't meant to be overridden again anyway.

    I can't give any promises about when we will get around to fix this.

  2. usiems commented on Oct 29, 2026

    @usiems
    Contributor

    As a quick fix you could try to add a rejection statement to the generator/typesystem_core.xml file. Something like
    <rejection class="QXmlStreamEntityResolver" function-name="resolveEntity" since-version="6.12"/>
    should prevent the method from being generated.

    But I suspect that this will not be the only problem with Qt 6.12

  3. usiems commented on Nov 30, 2026

    @usiems
    Contributor

    This issue has been avoided with the pull request #376. Since @lassoan didn't mention other issues, I assume generating and building the bindings for Qt 6.12.0 should work now. Please check.

  4. lassoan commented on Nov 30, 2026

    @lassoan
    Contributor

    Yes, #376 was all that we needed in our 3D Slicer build to make PythonQt build with Qt-6.12.

  5. FabioLolix commented on Dec 1, 2026

    @FabioLolix
    ContributorAuthor

    Hi, I get this now

    In file included from moc_com_trolltech_qt_webenginewidgets0.cpp:9:
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:754:10: error: ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, quint32)’ cannot be overloaded with ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      754 |     void runJavaScript(QWebEnginePage* theWrappedObject, const QString& scriptSource, quint32 worldId = 0) {
          |          ^~~~~~~~~~~~~
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:728:9: note: previous declaration ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      728 |    void runJavaScript(QWebEnginePage* theWrappedObject, const QString&  scriptSource, unsigned int  worldId = 0);
          |         ^~~~~~~~~~~~~
    In file included from ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.cpp:1:
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:754:10: error: ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, quint32)’ cannot be overloaded with ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      754 |     void runJavaScript(QWebEnginePage* theWrappedObject, const QString& scriptSource, quint32 worldId = 0) {
          |          ^~~~~~~~~~~~~
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:728:9: note: previous declaration ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      728 |    void runJavaScript(QWebEnginePage* theWrappedObject, const QString&  scriptSource, unsigned int  worldId = 0);
          |         ^~~~~~~~~~~~~
    In file included from ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets_init.cpp:3:
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:754:10: error: ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, quint32)’ cannot be overloaded with ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      754 |     void runJavaScript(QWebEnginePage* theWrappedObject, const QString& scriptSource, quint32 worldId = 0) {
          |          ^~~~~~~~~~~~~
    ../../generated_cpp/com_trolltech_qt_webenginewidgets/com_trolltech_qt_webenginewidgets0.h:728:9: note: previous declaration ‘void PythonQtWrapper_QWebEnginePage::runJavaScript(QWebEnginePage*, const QString&, unsigned int)’
      728 |    void runJavaScript(QWebEnginePage* theWrappedObject, const QString&  scriptSource, unsigned int  worldId = 0);
          |         ^~~~~~~~~~~~~
    make[2]: *** [Makefile:2492: com_trolltech_qt_webenginewidgets0.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [Makefile:2528: com_trolltech_qt_webenginewidgets_init.o] Error 1
    make[2]: *** [Makefile:2618: moc_com_trolltech_qt_webenginewidgets0.o] Error 1
    make[2]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions/PythonQt_QtAll'
    make[1]: *** [Makefile:47: sub-PythonQt_QtAll-make_first] Error 2
    make[1]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions'
    make: *** [Makefile:101: sub-extensions-make_first] Error 2
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions