Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Shadow for Rectangle and Circle.
Forum Updated to NodeBB v4.3 + New Features

Shadow for Rectangle and Circle.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Trikrista
    wrote on last edited by
    #1

    How will shadow create for Ractangle and Circle by means of DropShadow that happen like this http://i.stack.imgur.com/dxpcN.png

    I do so:

    Item {
        Rectangle {
            id: rect
            anchors.fill: parent
        }
        
        DropShadow {
            anchors.fill: rect
            radius: 18.0
            samples: 16
            color: "#80000000"
            source: rect
        }
    }
    

    but it do not work.

    I'm sorry for my bad English

    1 Reply Last reply
    0
    • L Offline
      L Offline
      literA2
      wrote on last edited by
      #2

      use RectangularGlow instead.

      1 Reply Last reply
      1
      • KambizK Offline
        KambizK Offline
        Kambiz
        wrote on last edited by
        #3

        Well, first you need to enable layer and then set layer effect by DropShadow for example check my sample:

         layer.enabled: true
                layer.effect: DropShadow {
                    horizontalOffset: 0;
                    radius: 8
                    samples: 16
                    source: {YourRectangleId}
                    color: "#20000000"
                    verticalOffset: 0;
                    transparentBorder: true
                    spread: 0
                }
        

        .:.We speak a universal language that brings us together.:.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved