5 Star 1 Fork 0

tjss / drawing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
roundrectitem.h 670 Bytes
一键复制 编辑 原始数据 按行查看 历史
kitfrankenstein 提交于 2018-12-16 16:39 . 增加插入图片
#ifndef ROUNDRECTITEM_H
#define ROUNDRECTITEM_H
#include <QPainter>
#include <QGraphicsItem>
#include <QGraphicsSceneMouseEvent>
/**
* @brief The RoundRectItem class
* 自定义圆角矩形
*/
class RoundRectItem : public QGraphicsRectItem
{
public:
explicit RoundRectItem(QGraphicsItem *parent = Q_NULLPTR);
RoundRectItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = Q_NULLPTR);
RoundRectItem(QRectF &rect, QGraphicsItem *parent = Q_NULLPTR);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QRectF rRect;
};
#endif // ROUNDRECTITEM_H
1
https://gitee.com/tjssqn/drawing.git
git@gitee.com:tjssqn/drawing.git
tjssqn
drawing
drawing
master

搜索帮助