Results 1 to 3 of 3

Thread: setMask (smooth)

  1. #1
    Join Date
    May 2007
    Posts
    32
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default setMask (smooth)

    How i can set the mask look like the right picture (frmae is smooth)?
    http://file.oboz.ua/files/vf46476dce...0751322586.jpg

    My result in the left.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: setMask (smooth)

    The mask is a bitmap (opaque/transparent) so if you need to include antialiasing, the mask should return opaque (1) for parts that are to be antialiased.

  3. #3
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: setMask (smooth)

    It depends on what you want to do. If you want to display a QPixmap in your application you should use a transparent png or use setAlphaCannel() instead of setMask() and the background will be propagated.
    On the other hand if you want to set the shape of a window(like the shaped clock example) you're out of luck. There is no easy platform independent way to do this. See this thread.

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.