Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Drawing a line consisting of filled circles.
Qt 6.11 is out! See what's new in the release blog

Drawing a line consisting of filled circles.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • worldwidewearyW Offline
    worldwidewearyW Offline
    worldwideweary
    wrote on last edited by
    #1

    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?

    "The price of freedom is eternal vigilance."

    raven-worxR 1 Reply Last reply
    0
    • worldwidewearyW worldwideweary

      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?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @worldwideweary
      what is wrong with QPen's pen-style property?!

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      3
      • worldwidewearyW Offline
        worldwidewearyW Offline
        worldwideweary
        wrote on last edited by worldwideweary
        #3

        @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

        "The price of freedom is eternal vigilance."

        aha_1980A 1 Reply Last reply
        0
        • worldwidewearyW worldwideweary

          @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

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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

          Qt has to stay free or it will die.

          worldwidewearyW 1 Reply Last reply
          0
          • aha_1980A aha_1980

            @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

            worldwidewearyW Offline
            worldwidewearyW Offline
            worldwideweary
            wrote on last edited by worldwideweary
            #5

            @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.

            "The price of freedom is eternal vigilance."

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved