问题 My main.cpp int main(int argc, char *argv[]) { QApplication a(argc, argv); QSurfaceFormat format; format.setDepthBufferSize(24); format.setStencilBufferSize(8); format.setVersion(3, 2); format.setProfile(QSurfaceFormat::CoreProfile); format.setSamples(4); QSurfaceFormat::setDefaultFormat(format); MyGLWidget w; w.setFormat(format); QGraphicsScene scene; QGraphicsProxyWidget* proxy = scene.addWidget(&w); scene.addText("Hello"); QGraphicsView view(&scene); view.show(); return a.exec(); } My