Results 1 to 2 of 2

Thread: How to draw the below round rect?

  1. #1
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question How to draw the below round rect?

    I want to draw the below round rect, it has the round corner in the topright and bottomright, it is still the rectangle in the topleft and bottomleft. How to draw it? The function Painter:rawRoundedRect must draw the round rect with the xRadius and yRadius, so it can't draw the above rect directly. thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to draw the below round rect?

    use QPainterPath. Just add your shape to it (with its api - read Docs) and use QPainter::drawPath().
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. round double
    By wirasto in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2009, 08:32
  2. Draw rect when mouse is pressed
    By crocpulsar in forum Qt Programming
    Replies: 0
    Last Post: 19th March 2009, 04:51
  3. Round window
    By bunjee in forum Qt Programming
    Replies: 4
    Last Post: 25th November 2007, 20:23
  4. How to draw a filled round rect?
    By high_flyer in forum Qt Programming
    Replies: 8
    Last Post: 11th May 2006, 10:26
  5. Round Button
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2006, 11:32

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.