Chapter XI graphical view, the animation, the state machine frame

2019-9-18

  1. A graphical view of the frame structure
场景(QGraphicsScene):场景是图形项对象的容器;
视图(QGraphicsView):使场景中的内容可视化;
图形项
Tips:
逻辑坐标->场景坐标:QPainter,就是一个300*400的矩阵,与画在哪里无关;
视图坐标->物理坐标:QPainterDevice,就是显示设备;
利用鼠标的事件event->pos()得到的坐标值是在QWidget内的相对坐标位置,
而event->globalPos()则是位于整个屏幕的绝对位置
参考:https://blog.csdn.net/hgcprg/article/details/53537106
  1. Coordinate systems and event processing
对于自定义图形项,需要重写boundingRect以及paint函数
  1. Other features
    1) graphics
    2) animation, collision detection, and the graphics item group
    3) printing and rendering with OpenGL
    4) widgets, layouts and embedded member

  2. Animation Framework

  3. State machine frame

Published 179 original articles · won praise 79 · views 70000 +

Guess you like

Origin blog.csdn.net/qq_34600424/article/details/100988457