Results 1 to 2 of 2

Thread: customize shadow effect form

  1. #1
    Join Date
    Apr 2016
    Posts
    13
    Thanks
    8
    Qt products
    Qt5

    Default customize shadow effect form

    Hi, I want to make a custom window and let it shadow effects
    To do this I used the following code, but do not work
    Qt Code:
    1. ApplicationWindow {
    2. id: win
    3. flags: Qt.FramelessWindowHint | Qt.NonModal
    4. DropShadow {
    5. anchors.fill: parent
    6. horizontalOffset: 3
    7. verticalOffset: 3
    8. radius: 8.0
    9. samples: 17
    10. color: "#80000000"
    11. source: parent
    12. }
    13. }
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: customize shadow effect form

    You cannot paint outside the window thus the code above will not work. You need a window with translucent background and paint the shadow inside the window geometry. Try adding the translucent background flag to your window and maybe it will work.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Text drop-shadow using CSS (text-shadow)
    By xtal256 in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2018, 10:08
  2. QLabel with shadow effect issue
    By jiveaxe in forum Newbie
    Replies: 2
    Last Post: 5th May 2014, 10:56
  3. Replies: 3
    Last Post: 18th July 2013, 04:12
  4. Replies: 0
    Last Post: 9th August 2012, 03:19
  5. drawing shadow effect
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 15:41

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.