summaryrefslogtreecommitdiffstats
path: root/main.cpp
blob: 9ac55588df5d46bf9490095c730c9631b002fc1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "graphicsscene.h"

#include <QtOpenGL>

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();
}