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. [SOLVED] How to delete internal curves in QPainterPath
QtWS25 Last Chance

[SOLVED] How to delete internal curves in QPainterPath

Scheduled Pinned Locked Moved General and Desktop
qpainterqpainterpath
2 Posts 2 Posters 1.5k Views
  • 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.
  • V Offline
    V Offline
    Vitek
    wrote on 26 Jul 2015, 15:44 last edited by Vitek
    #1

    alt text

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 26 Jul 2015, 22:49 last edited by mrjj
      #2

      Hi and welcome
      It has an overloaded + operator so you can just use that.
      Note: This does not delete it as such, it combines.

      void SWidget::paintEvent ( QPaintEvent* e )
      {
          QPainter p ( this );
      
          QPainterPath path1;
          path1.addRect ( 20, 20, 60, 60 );
          QPainterPath path2;
          path2.addEllipse ( 40, 40, 60, 60 );
          QPainterPath path3 = path1 + path2;
          p.drawPath ( path3 );
      }
      
      1 Reply Last reply
      1

      2/2

      26 Jul 2015, 22:49

      • Login

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