coin3d / soqt

Old Coin GUI binding for Qt, replaced by Quarter
BSD 3-Clause "New" or "Revised" License
23 stars 17 forks source link

Add support for Qt6 #67

Closed rickertm closed 3 years ago

rickertm commented 3 years ago

QGLWidget, QGLFormat and QGLContext have been removed in Qt6. The closest replacement to QGLWidget is a QOpenGLWindow combined with QWidget::createWindowContainer, however overlays are now longer included by default. The alternative QOpenGLWidget renders to a framebuffer and is apparently not fully compatible with Coin. QSurfaceFormat differs in some settings, e.g., accumulation buffers are no longer supported.

The function QWindowContainer::containedWindow for accessing the QOpenGLWindow from the QWidget used throughout the SoQt API is not public, therefore the corresponding pointer is stored inside a SoQtGLArea property of the widget.

Fixes qt_generate_moc to add Qt include directories necessary for the QT_VERSION definition.

Tested on MSVC 2019, Ubuntu 20.04, and macOS 10.14 with 6.0.0 binaries provided by Qt.

Requires updated sogui, see https://github.com/coin3d/sogui/pull/2.

VolkerEnderlein commented 3 years ago

Thank you @rickertm for this patch. It is highly appreciated.