
QGraphicsScene 클래스는 다양한 2D 그래픽 요소들을 관리하는 캔버스와 같은 역할을 수행하고 작성된 씬은 QGraphicsView (QGraphicsView 클래스(QT C++) 참조) 클래스를 통해서 뷰로 출력한다. QObject를 상속받는다. 참조 링크 : https://doc.qt.io/qt-5/qgraphicsscene.html QGraphicsScene* grpscene = new QGraphicsScene(); grpscene->setSceneRect(0, 0, 800, 600); grpscene->addRect(10, 10, 50, 50, QPen(Qt::red, 2), QBrush(Qt::yellow, Qt::SolidPattern)); grpscene->addText((TabC..

QGraphicsView 클래스는 QGraphicsScene 기반으로 만들어진 2D 그래픽을 스크롤 가능한 뷰로 출력하는 역할을 수행한다. QWidget> QFrame> QAbstractScrollArea의 계층 구조로 상속받는다. 뷰 영역의 크기에 따라서 자동적으로 스크롤바를 표시한다. 참조 링크 : https://doc.qt.io/qt-5/qgraphicsview.html https://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html QGraphicsScene *scene = new QGraphicsScene(); scene->addText("Hello, world!"); QGraphicsView *view = new QGraphics..