Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Draw outside of BoundingRect via QPainter
Forum Updated to NodeBB v4.3 + New Features

Draw outside of BoundingRect via QPainter

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.7k 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.
  • D Offline
    D Offline
    DavidM29
    wrote on last edited by
    #1

    Hello,

    I made a radialbar taking this one as a base : https://arunpkqt.wordpress.com/2017/03/31/qml-radialbar-component/
    I added a few thing on it and I the main elements are low and high limit. It looks like that :
    0_1530536020162_58c28b64-abcf-450c-8692-b48125e3140e-image.png
    With this point of view everything seems fine but when I change the value of limit and it comes close to an angle of pi,2pi of 0.5pi the boudingrect cut the line. Here is an example :
    0_1530536182066_653721c3-a15b-4a2f-bb94-70db939ca8af-image.png

    How can I manage to keep my entire line ?
    Thank you in advance.

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      You can't paint outside of a widgets' rect in QWidget::paintEvent().

      To accomodate for the graphical bars, you'll probably need to make the widget's size bigger.

      Director R&D, The Qt Company

      1 Reply Last reply
      4
      • D Offline
        D Offline
        DavidM29
        wrote on last edited by
        #3

        Finaly I did change the size of the component.

        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