QGLViewer defines yet-another-vector-type. Couldn't you just use the QVector3D that now ships with Qt5? Especially the OpenGL4 API for Qt accepts natively QVector3D, etc...
Because of this incongruence my code is scattered with usages of this function:
#include <QVector3D>
namespace qt{
inline QVector3D tr(const qglviewer::Vec& v){
return QVector3D(v.x, v.y, v.z);
}
}