繁体   English   中英

QOpenGLWidget linker 错误与 QT 示例代码

[英]QOpenGLWidget linker error with QT example code

after several failed attempts to create a QOpenGLWidget.I tried to run the QT example code https://code.qt.io/cgit/qt/qtbase.git/tree/examples/opengl/2dpainting?h=5.15 But that does not也工作。 我得到与之前尝试相同的 vtable 错误。 这是完整的错误代码。

错误代码

我已经重新安装了 QT 并添加了

QT += core gui widgets opengl

LIBS += -framework OpenGL -framework QtOpenGL -framework GLUT 

到.pro文件

如果您使用 Qt6,那么您需要链接到openglwidgets

https://doc.qt.io/qt-6/qopenglwidget.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM