How to draw a balloon using code
-
wrote on 28 Apr 2011, 14:52 last edited by
I try to use the cubic Bezier curve, but I do not know how to do this.
Is there any other options?Thanks
-
wrote on 28 Apr 2011, 16:35 last edited by
Is there any reason why an image is not an option? Not even SVG?
-
wrote on 29 Apr 2011, 02:38 last edited by
Can QT render SVG format? which class? Where can I find SVG balloon?
-
wrote on 29 Apr 2011, 05:00 last edited by
Yes, Qt (not QT) can render SVG. One way is to use QSvgRenderer, but if you just want a widget, you might as well use QSvgWidget.
Balloons in SVG format can be found at the other end of Google search, or on your hard disk after you draw one with any SVG editing tool.
-
wrote on 29 Apr 2011, 05:14 last edited by
Thanks Andre. I buy your suggestion.
Btw, for cubic Bezier curve, it requires 4 points, why Qt API QPainterPath::cubicTo() only have 3 points? -
wrote on 29 Apr 2011, 05:20 last edited by
[quote author="xhsoldier" date="1304054041"]Thanks Andre. I buy your suggestion.[/quote]
At what price? ;-)
[quote]
Btw, for cubic Bezier curve, it requires 4 points, why Qt API QPainterPath::cubicTo() only have 3 points?[/quote]
Because you already have the starting point in your path, and can set that separately if you want. -
wrote on 29 Apr 2011, 05:25 last edited by
the cubic curve in Qt is different from the standard cubic curve. I have tested.
1/7