当前位置:网站首页>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图形,比如线,长方形,三角形,圆形,譬如流程图里面的那些图形,箭头,笑脸符号,注释框,各种各样的符号,现在让你做一个流程图的软件
边栏推荐
- C # realizes the communication between Modbus protocol and PLC
- 行测-图形推理-9-线条问题类
- [problem] pytorch installation
- Revit secondary development - cut view
- 全面掌控!打造智慧城市建设的“领导驾驶舱”
- Microservice Remote debug, nocalhost + rainbond microservice Development second Bomb
- Robot autonomous exploration DSVP: code parsing
- Time convolution Network + soft threshold + attention mechanism to realize residual life prediction of mechanical equipment
- 如何选择合适的自动化测试工具?
- How to realize the movement control of characters in horizontal game
猜你喜欢

Redis cluster installation
![LeetCode142. Circular linked list II [two pointers, two methods for judging links in the linked list and finding ring points]](/img/5e/e442c8649b9123a9d9df7c0d61a564.jpg)
LeetCode142. Circular linked list II [two pointers, two methods for judging links in the linked list and finding ring points]

UWA问答精选

Leetcode94. Middle order traversal of binary trees

Basic knowledge of linked list

0-5vac to 4-20mA AC current isolated transmitter / conversion module

微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹

UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xf9 in position 56: illegal multibyte sequence

Remember aximp once Use of exe tool

行测-图形推理-7-相异图形类
随机推荐
LeetCode144. Preorder traversal of binary tree
Get the exact offset of the element
行测-图形推理-7-相异图形类
Common verification rules of form components -2 (continuously updating ~)
ASP.NET Core入门五
Ren Qian code compilation error modification
Blender exchange group, welcome to the water group ~
Revit secondary development - modify wall thickness
Redis official ORM framework is more elegant than redistemplate
Leetcode94. Middle order traversal of binary trees
Debezium系列之:源码阅读之BinlogReader
Debezium系列之:mysql墓碑事件
Revit secondary development - operation family documents
Firefox browser installation impression notes clipping
Micro service remote debug, nocalhost + rainbow micro service development second bullet
Record layoutrebuild Forcerebuildlayoutimmediate does not take effect
How to choose the appropriate automated testing tools?
Ni9185 and ni9234 hardware settings in Ni Max
Debezium series: set role statement supporting mysql8
This experimental syntax requires enabling the parser plugin: ‘optionalChaining‘