Ok! Then I would highly recommend to use the comfortable opengl wrapping that QPainter allows:

In another thread just yesterday I set up a simple OpenGL GraphicsView:

http://www.qtcentre.org/threads/3424...476#post158476

Instead of a button-widget you will add lots of custom QGraphicsItems for the different mathematical objects.

Use scene->addItem(new Vector(QVector3D(..)));

Qt Code:
  1. class Vector : public QGraphicsItem
  2. {
  3. public:
  4. Vector(QVector3D a);
  5. QRectF boundingRect() const{ return QRectF( ... ); }
  6.  
  7. void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget)
  8. {
  9. painter->drawLine(.. );
  10. }
  11. };
To copy to clipboard, switch view to plain text mode 

Let me know if you run into more problems!

Joh