Qt新技巧总结
作者:互联网
最近在看一本关于qt游戏编程的书《Game Programming using Qt 5 Beginner's Guide》,里面对于qt的内容讲的非常细,对于之前没有用过的部分,做一下记录:
GraphicsView篇
QGraphicsScene设置在点击背景后不清除item焦点可以设置下面的属性
stickyFocus
QGraphicsView设置使用鼠标左键拖拽显示的内容
QGraphicsView::ScrollHandDrag
设置文本item不随parent发生尺寸缩放或旋转
text->setFlag(QGraphicsItem::ItemIgnoresTransformations);
标签:总结,QGraphicsView,qt,缩放,技巧,item,设置,Qt 来源: https://www.cnblogs.com/AlainGao/p/12230777.html