Results 1 to 3 of 3

Thread: Draw border of a QRegion

  1. #1
    Join Date
    Jun 2014
    Posts
    7
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Draw border of a QRegion

    Hello everyone, I'm having a problem drawing the border of a QRegion...
    It so happens I was trying to develop a small loader with borders rounded, so I followed Google until I found a solution here on the forums. I clipped the drawing area with the use of QRegion, now, I've got the QRegion of the whole QWidget, and I need to paint the borders for it as it's been clipped (the region is contained inside a QRegion that I previously mentioned).
    I've been suggested to use another approach like to generate a QPolygon and use a drawing path for that, but I don't know how to do it.
    Is there any way I can paint the borders of that QRegion?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Draw border of a QRegion

    Hmm.

    Have you tried QPainterPath::addRegion()?

    Cheers,
    _

  3. #3
    Join Date
    Jun 2014
    Posts
    7
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Draw border of a QRegion

    Yes, to not the desired avail. It paints where the decorated window should be, don't really know why it does so but so it does..

Similar Threads

  1. Draw line with border
    By folibis in forum Qt Programming
    Replies: 7
    Last Post: 24th August 2013, 13:53
  2. QRegion from QPolygon border issue
    By jorenheit in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2012, 15:18
  3. How draw border in QProgressDialog?
    By kamlesh.sangani in forum Qt Programming
    Replies: 0
    Last Post: 5th June 2009, 11:32
  4. Replies: 2
    Last Post: 5th July 2008, 19:35
  5. How draw extra border on QGraphicsTextItem?
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 8th July 2007, 15:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.