summaryrefslogtreecommitdiffstats
path: root/main.cpp
blob: e71e3341e15cc1a4acd4047726b2c9c1b86c7bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <QtGui>
#include <QtOpenGL>

#include "graphicsscene.h"

int main(int argc, char **argv)
{
    QApplication app(argc, argv);

    QGraphicsView view;
    view.setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));

    view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    view.setTransformationAnchor(QGraphicsView::NoAnchor);
    view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);

    view.setScene(new GraphicsScene);
    view.show();

    return app.exec();
}