Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the OpenGL module in Qt #241

Open
wangdaye078 opened this issue Dec 2, 2024 · 4 comments
Open

About the OpenGL module in Qt #241

wangdaye078 opened this issue Dec 2, 2024 · 4 comments

Comments

@wangdaye078
Copy link

wangdaye078 commented Dec 2, 2024

Starting from Qt6.0, classes QOpenGLXXXX (such as QOpenGLBuffer) have been migrated to the QtOpenGL module.
Therefore, the
<object type name="QOpenGLBuffer"/>
in typesystem_gui.xml should be changed to
<object type name="QOpenGLBuffer" before-version="6"/>,
and then
<object type name="QOpenGLBuffer" since-version="6"/>
should be added to typesystem_opengl.xml. Other QOpenGLXXXXs should also be treated similarly,
while the original QGLBuffer in typesystem_opengl.xml should be changed to
<object type name="QGLBuffer Before-version=" 6 "/>

int PythonQt_QtAll.pro

  lessThan(QT_MAJOR_VERSION, 6) {
    # module is empty in Qt6
    qtHaveModule(opengl):CONFIG += PythonQtOpengl
  }

changto:
qtHaveModule(opengl):CONFIG += PythonQtOpengl

PythonQtOpengl {
  DEFINES += PYTHONQT_WITH_OPENGL
  QT += opengl
  PythonQtCore: Xinclude (com_trolltech_qt_opengl)
  QT += xml
}

changto:

PythonQtOpengl {
  DEFINES += PYTHONQT_WITH_OPENGL
  QT += opengl
  equals(QT_MAJOR_VERSION, 6){
    QT += openglwidgets
  }
  PythonQtCore: Xinclude (com_trolltech_qt_opengl)
  QT += xml
}
@mrbean-bremen
Copy link
Contributor

Thanks! Looks like you have already figured this out - do you want to make a PR?

@wangdaye078
Copy link
Author

I'm not very good at using GIT, I'm afraid of making mistakes

@mrbean-bremen
Copy link
Contributor

Well, if you want to try - you can't break anything, and we can certainly help you!

@wangdaye078
Copy link
Author

i had make a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants