Did you try this?Qt Code:
_painter.setPen( Qt::DashLine );To copy to clipboard, switch view to plain text mode
Did you try this?Qt Code:
_painter.setPen( Qt::DashLine );To copy to clipboard, switch view to plain text mode
It will only change the outline, and he wants the filling striped. At least that's what I understand...Originally Posted by jacek
It will only change the outline, and he wants the filling striped. At least that's what I understand...
Exactly jacek.
I think that the result doesn't looks like a stripped line...Quote:
Originally Posted by wysota
...you could draw many rectangles with different colours.
I don't think that you'll find a better solution You know you only have to create once, one black and one white rectangle and then just draw them one after the other repeatidly.
Last edited by SkripT; 24th January 2006 at 08:59.
Then we must have misunderstood what you are looking for![]()
Could you provide a picture of what you want to achieve?
Very easy, what I want is simply a rubber band. The problem drawing it with setPen( Qt:ashLine ) is that you can only choose one colour, I want to choose the two colors: black & white.
You can draw white rectangle with a solid line and then a black one using dashed line.Originally Posted by SkripT
Have you seen QRubberBand?
One time more, thanks. I don't know what i was tinking of.... The solution is very easyYou can draw white rectangle with a solid line and then a black one using dashed line.![]()
Bookmarks