如何在Qt中以图形方式绘制回旋? [英] How to draw clothoids graphically in Qt?

查看:131
本文介绍了如何在Qt中以图形方式绘制回旋?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个应用程序,用户可以使用它来绘制与输入鼠标的回旋曲线,即设置起点和终点的螺旋,然后通过拖动这些点与鼠标他也可以设置形状的回旋曲线,通过修改起始和结束曲率。可能是为了改变曲率,我将需要使用切线,虽然我不知道这一点。



如何在Qt中实现?你知道我可以在Qt中运行的任何示例代码吗?

解决方案

最好的方法可能是使用图形视图框架



以下几个示例可帮助您开始使用图形视图示例页面。 图场景看起来像是您想要的一个很好的起点实现。


I am trying to build an application which the user can use to draw clothoids with the mouse, i.e. to set the start point and the end point of the spiral and then by dragging these points with the mouse he could also set the shape of the clothoid by modifying the start and end curvature. Probably for changing the curvature I will need to use the tangents though I am not sure of that.

How can one implement that in Qt? Do you know of any example codes that I could run in Qt?

解决方案

The best approach would probably be to use the Graphics View Framework.

There are a few examples that should help you getting started in the Graphics View Examples page. The Diagram scene one looks like a good starting point for what you want to achieve.

这篇关于如何在Qt中以图形方式绘制回旋?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆