Unsolved Drawing a line consisting of filled circles.
-
It was supposed Qt::RoundCap as a pen style would allow drawing a line consisting of dots, but instead the result is of rectangular 'pill' shapes: rectangles with rounded edges on either side.
Is there a way to get something similar with true dotted circles using PenStyles and Lines? If not, what other way would be appropriate to provide the same functionality as regular line drawing + pen styles to achieve this?
-
@worldwideweary
what is wrong with QPen's pen-style property?! -
@raven-worx
My first sentence answers your question, i.e., the fact that the dots are not actual dots but are rounded off rectangles. To reiterate, if I want a line consisting of dots, actual dots in the sense that they be 'well-rounded' (as in having a radius), it would seem the pen-style doesn't offer this. What is another way to do so easily? Or if there is a way using the line + pen, please demonstrate. Otherwise, I've filed an issue regarding this here:
https://bugreports.qt.io/browse/QTBUG-67050 -
@worldwideweary the bug is already two weeks old, why didn't you tell us?
you can always discuss ( as it seems you are not satisfied with the answers from the report ), but you should tell all people involved where you come from.
thanks
-
@aha_1980 Nice observation with the bug's date.
You are correct, the answer has not been given regarding how to achieve what is being asked, and it was hoped that an experienced Qt user would either explain how to correctly draw truly circular-dotted lines or say that it is impossible with the currently available options. It was assumed a "dotted" pen-style would achieve this, but since it didn't, it was considered a bug because the options of a 'dotted' and 'rounded' pen-style line gave an impression of a line consisting of truly rounded dots.
So far and now with the addition of the question's not being answered, it would seem impossible, but if someone knows any better it would be greatly appreciated if a reply including how to do so were posted. An alternative to the use of a pen and line is welcome, but it would be excellent if a line could be drawn rather than resorting to some other drawing method.