Skip to content

FEAT: Support Qt 6.8 with C++17 #516

Open

Description

@JamesBloomScheff2

I am trying to update from Qt5.15 to Qt6.8. We are using gcc 11. I downloaded the latest QtNodes a couple of days ago. I'm having a problem building QtNodes. I don't know if the problem is within QtNodes, Qt, or some symbol or option set wrong. I'm getting hundreds of errors that look like this:

In file included from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qglobal.h:63, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qnamespace.h:12, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qobjectdefs.h:12, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/QMetaObject:1, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/Definitions.hpp:5, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/ConnectionIdHash.hpp:5, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/AbstractGraphModel.hpp:3, from /fa/sw/qtnodes/v3-08-jbf2-02/src/AbstractGraphModel.cpp:1: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h: In function ‘bool operator==(const QMetaType&, const QMetaType&)’: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h:536:5: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QMetaType) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qglobal.h:63, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qnamespace.h:12, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qobjectdefs.h:12, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/QMetaObject:1, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/Definitions.hpp:5, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/AbstractNodeGeometry.hpp:3, from /fa/sw/qtnodes/v3-08-jbf2-02/src/AbstractNodeGeometry.cpp:1: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h: In function ‘bool operator==(const QMetaType&, const QMetaType&)’: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h:536:5: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QMetaType) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qglobal.h:63, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtGui/qtguiglobal.h:7, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtGui/qcolor.h:7, from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtGui/QColor:1, from /fa/sw/qtnodes/v3-08-jbf2-02/include/QtNodes/internal/GraphicsViewStyle.hpp:3, from /fa/sw/qtnodes/v3-08-jbf2-02/src/GraphicsViewStyle.cpp:1: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h: In function ‘bool operator==(const QMetaType&, const QMetaType&)’: /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h:536:5: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept

As near as I can tell online, there was a change in Qt6 that required a code change in programs that use Qt6. I don't see any indication that that was done for QtNodes.

Any suggestions or help would be appreciated. Thanks

Activity

  1. paceholder commented on Mar 9, 2026

    @paceholder
    Owner

    Hi,

    not a proven solution, but might give you a couple of insights:

    The Core Problem
    Qt 6.8 uses C++20 features — specifically, it relies on the compiler supporting noexcept specifiers on comparison operators (like operator==) in a way that satisfies static_assert checks introduced in newer Qt versions.

    GCC 11's C++20 support is incomplete. In particular:

    Qt 6.8 internally uses macros like Q_DECLARE_EQUALITY_COMPARABLE which assume the compiler can handle noexcept on spaceship/comparison operators correctly under C++20
    GCC 11 has partial C++20 support but lacks full noexcept-on-comparison-operators compliance
    This causes the static_assert inside qmetatype.h to fire on every translation unit that includes Qt headers — hence hundreds of errors

    Solutions

    • upgrage GCC to 12 or 13
    • or use clang >=14
    • or downgrade Qt to <6.7
    • force C++17 in your CMake configs
  2. JamesBloomScheff2 commented on Mar 13, 2026

    @JamesBloomScheff2
    Author
  3. changed the title [-]Question[/-] [+]FEAT: Support Qt 6.8 with C++17[/+] on Apr 25, 2026
  4. JamesBloomScheff2 commented on May 1, 2026

    @JamesBloomScheff2
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions