当我想抓取整个窗口时,我只能在centralWidget中抓取用OpenGL绘制的东西。
QPixmap my_pixmap = QPixmap::grabWidget(ui->OpenGLWidget, 0, 0, frameto264.iWidth, frameto264.iHeigth);
我用 QT 绘制的东西,比如 QPixmap 或 QPainter(甚至在 statusBar 中),不能在grabWidget 中显示。
谁能告诉我如何获取整个主窗口,或者ui->OpenGLWidget使用错误?
这是我第一次在 stackoverflow 上提问。如果我的陈述有问题,请随时纠正。