Fix PCA demo for QGLViewer 2.7

This commit is contained in:
Maxime Gimeno 2017-06-27 15:50:24 +02:00
parent 51f7218c2a
commit 83a404f555
2 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,11 @@ void MainWindow::on_actionCopy_snapshot_triggered()
QClipboard *qb = QApplication::clipboard();
m_pViewer->makeCurrent();
m_pViewer->raise();
#if QGLVIEWER_VERSION >= 0x020700
QImage snapshot = m_pViewer->grabFramebuffer();
#else
QImage snapshot = m_pViewer->grabFrameBuffer(true);
#endif
qb->setImage(snapshot);
QApplication::restoreOverrideCursor();
}

View File

@ -1,6 +1,6 @@
#ifndef VIEWER_H
#define VIEWER_H
#include <QMap>
#include <QGLViewer/qglviewer.h>
// forward declarations