Results 1 to 5 of 5

Thread: Round window

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Round window

    Hey there,

    I'm trying to display a window widget with rounded edges.
    I've tryed with setMask + specifying a mask, but the result is not convincing.



    Qt Code:
    1. QRect maskRect(rect().x() + 1, rect().y() + 1,
    2. rect().width() - 1, rect().height() - 1);
    3.  
    4. setMask(QRegion(ZePainterController::get()->DrawRoundRect(maskRect,
    5. 2000 / maskRect.width(), 2000 / maskRect.height()).toFillPolygon().toPolygon()));
    To copy to clipboard, switch view to plain text mode 

    Don't know If I should use a mask bitmap ?
    Last edited by bunjee; 23rd November 2007 at 14:33.

Similar Threads

  1. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16
  2. Popup window with round borders
    By anderssonj in forum Qt Programming
    Replies: 1
    Last Post: 16th September 2007, 19:45
  3. Regarding drawing on Transparent Window
    By Shalabh in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2007, 10:32
  4. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21

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
  •  
Qt is a trademark of The Qt Company.