当前位置:网站首页>Qt Graphicsview图形视图使用总结附流程图开发案例雏形
Qt Graphicsview图形视图使用总结附流程图开发案例雏形
2022-07-07 21:47:00 【新潮技术研究社】
QGraphicsview的前身是QCanvas,可想而知,它就是画布,继承自QWidget,和QTableView,QListView等view都是可视控件,也就是可以show的控件。
对于这些View,我们知道,一般都得和一个Model绑定,Model负责内容的添加管理,View负责展示。所以,QGraphicsView同样有一个Model,就是QGraphicsScene,一个scene可以绑定多个view,scene可以设置大小,也可以不设置。
QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject *parent = nullptr)
QGraphicsScene(const QRectF &sceneRect, QObject *parent = nullptr)
QGraphicsScene(QObject *parent = nullptr)典型使用代码如下:
QGraphicsScene scene;
scene.addText("Hello, world!");
QGraphicsView view(&scene);
view.show();
Graphics View框架的作用就是,提供了一层表面,在这个面上,可以管理大量的2D图形,比如线,长方形,三角形,圆形,譬如流程图里面的那些图形,箭头,笑脸符号,注释框,各种各样的符号,现在让你做一个流程图的软件
边栏推荐
- Debezium series: set role statement supporting mysql8
- Leetcode1984. Minimum difference in student scores
- C development -- WPF simple animation
- 如何选择合适的自动化测试工具?
- 行测-图形推理-6-相似图形类
- UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xf9 in position 56: illegal multibyte sequence
- [azure microservice service fabric] start the performance monitor in the SF node and set the method of capturing the process
- Firefox browser installation impression notes clipping
- Dbsync adds support for mongodb and ES
- Revit secondary development - cut view
猜你喜欢

Ligne - raisonnement graphique - 4 - classe de lettres

Nx10.0 installation tutorial

行测-图形推理-2-黑白格类

LeetCode707. Design linked list

行测-图形推理-6-相似图形类

ASP. Net core introduction V

How to choose the appropriate automated testing tools?

UWA问答精选

Vs custom template - take the custom class template as an example

Visual design form QT designer design gui single form program
随机推荐
行测-图形推理-6-相似图形类
Typeorm automatically generates entity classes
OpenGL job - texture
Basic knowledge of linked list
行测-图形推理-7-相异图形类
C # Development -- pit encountered in JS intermodulation
Gazebo import the mapping model created by blender
CTF练习
De la famille debezium: SET ROLE statements supportant mysql8
Take full control! Create a "leading cockpit" for smart city construction
如何选择合适的自动化测试工具?
Unity development --- the mouse controls the camera to move, rotate and zoom
Ligne - raisonnement graphique - 4 - classe de lettres
行测-图形推理-2-黑白格类
UWA问答精选
C development -- WPF simple animation
vite Unrestricted file system access to
Debezium series: binlogreader for source code reading
0-5vac to 4-20mA AC current isolated transmitter / conversion module
Signal feature extraction +lstm to realize gear reducer fault diagnosis -matlab code