Qt QGraphicsScene||GraphicsView函数刷新多次内存溢出问题 需将QGraphicsScene *scene = new QGraphicsScene;放入上面声明头文件中声明: cpp文件中声明: 使用: 需要添加这个 scene->clear(); 这样就没有内存溢出了: