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