Qt draw lines without fill but edge lines - qt

I am trying to draw wide lines like(50 pixel wide) on screen with transparent filling and solid colored edge lines.
Transparent fill with solid edge lines
Any suggestions on how to implement this in Qt?

create a QPainterPath
add the desired shapes to it, like QPainterPath::addRoundedRect()
use QPainter::strokePath(yourpath, yourpen) to draw just the outline

Related

Qt data visualization background image and transparency support

Does the data visualization module support background image especially Surface3D element , also is there any why to apply transparency to plot color. Basically I need to place an image on x-z plane and draw surface plot above it with some transparency, so the user can see the background image through the surface plot.

How to scale an image and kepp the lines thickness?

I have a line art, an animated transparent gif on page, made in photoshop.
#img01{
max-width:79%;
max-height:79%;
margin-top:3vh;
}
On small screen size (mobile), thickness of lines is too thin, and on screens over 1024px the lines are too thick ?
Is there a way to scale only the size of image, and keep the thickness of drawing ?
GIF is a raster-based image format. There's no way to nicely (and automatically) modify an image like that. What you're looking for is a vector-based image/animation format.
There are two obvious candidates for this:
Flash
SVG (Scalable Vector Graphics)

Drawing line with border

I've faced a problem in Qt where I need to draw lines with borders (I have coordinates for nodes and I am just drawing simple thick line from node to node). Just like this: http://img23.imageshack.us/img23/3596/askej.jpg
At first I tried to draw thicker red line and after that black line, but I got inappropriate connecting as you can see at the image above.
Moreover the idea in which we draw all red lines and after that all black lines won't work as well. The lines can be crossed so with this idea we won't have borders over the crossing another line.
Could somebody help me with this problem, please?
Thanks.
// feel free to show me mistakes in my english too
I have exactly this situation in a GIS app (Merkaartor)
You need to work by layers, where all paths on the same layer will first be drawn red then black.
For instance, layer -1 would be tunnels, you draw them first, red then black, then layer 0 are surface roads, you draw them red then black, then layer 1 are bridges, etc...
This properly render a "map" feeling.

Show speedometer like needle with mschart

I need to create a chart looking like one shown in the image below using mschart. I can create the half circle using transparent color for the lower half of the doughnut chart, but i am unable to find way to show the needle.
The half circle is 100% and in the image the indicator is on 23%.
Also if there is another way to show the same information with mschart I can change the geography of the chart.

How to create a dashed line rounded rectangle in Flex?

How can I create a rounded rectangle with a dashed line? I've seen several routines that draw their own straight lines, but nothing for rounded rectangles.
There used to be (probably still is) a great AS 2/3 library for this but I can't find it.
This looks pretty promising:
http://blog.alegitimatebusiness.com/2007/11/07/as2-as3-draw-a-dotted-rounded-corner-box/

Resources