#include <QApplication>

#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsScene>

class PaternWidget : public QGraphicsView
{
public:
    PaternWidget()
    {
        this->setScene(&scene);
        scene.setSceneRect(-100.0, -100.0, 200.0, 200.0);
        this->fitInView(-100.0, -100.0, 200.0, 200.0, Qt::KeepAspectRatio);
        scene.addLine(0, -100, 0, 100);
        scene.addLine(-100, 0, 100, 0);
        scene.addEllipse(-90.0, -90.0, 180.0, 180.0);
    }

protected:
    QGraphicsScene scene;
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    PaternWidget widget;
    widget.setGeometry(100, 100, 400, 400);
    widget.show();

    return a.exec();
}
