Results 1 to 2 of 2

Thread: Popup window with round borders

  1. #1
    Join Date
    Jun 2007
    Posts
    7
    Thanks
    1

    Question Popup window with round borders

    Hi,

    I've created a top-level window (a QFrame with the Popup window flag set), and a stylesheet that gives me round edges using the radius property.

    However, I get background color - not transparency - outside the round edges, between the drawn border and an imagined width() * height() rectangle.

    When I use my widget as a child of another widget I do get the desired effect. It just doesn't work when the widget is a top-level window. I get the same behaviour on Mac and Win.

    Do I need to create and set a mask for this to work?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Popup window with round borders

    A mask will work, but you will get rough edges.
    Search the forums for ARGB windows.
    One of the users, kernel_panic, managed to do this by setting a transparent png as window background. By transparent I mean a rounded rectangle with soft edges.
    However, it is only for windows and linux, as far as I know.

    I get the same behaviour on Mac and Win.
    Strange, it should work on mac.

    Regards

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.