查看完整版本: [-- 求问qcustomplot怎么画带角度的斜椭圆???急求,跪谢!! --]

QTCN开发网 -> 其它技术开发讨论区 -> 求问qcustomplot怎么画带角度的斜椭圆???急求,跪谢!! [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

july0701 2022-03-11 18:01

求问qcustomplot怎么画带角度的斜椭圆???急求,跪谢!!



急求,跪谢!!
  

july0701 2022-03-11 18:03
ellipse->topLeft->setCoords(-xvalue, -yvalue);
ellipse->bottomRight->setCoords(xvalue, yvalue);
这种方式只能画出来水平的椭圆,没法带角度

lieber 2022-03-11 19:06
void QPainter::rotate(qreal angle)
Rotates the coordinate system clockwise. The given angle parameter is in degrees.

maxlogo 2022-03-13 08:20
继承重写就是了,具体可以参考QCPItemText

july0701 2022-03-13 22:05
lieber:void QPainter::rotate(qreal angle)
Rotates the coordinate system clockwise. The given angle parameter is in degrees.
 (2022-03-11 19:06) 

Qpainter我用了,画坐标轴不太好画,而且这个椭圆会随着输入参数的变化而变化,所以考虑用qcustomplot这个类试试看。

july0701 2022-03-13 22:08
maxlogo:继承重写就是了,具体可以参考QCPItemText (2022-03-13 08:20) 

就是目前的类还不能直接实现是么?新手不是太懂


查看完整版本: [-- 求问qcustomplot怎么画带角度的斜椭圆???急求,跪谢!! --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled