Glow QML type duplicating object
-
Hi there, I'm trying to make a MapQuickItem that appears as a circle on a map glow, but when I apply glow to the MapQuickItem, it seems to duplicate the object separate from the original object like so:
Here is the code:
MapQuickItem { id: vehicleIconGlow anchorPoint.x: image.width anchorPoint.y: image.height coordinate: QtPositioning.coordinate(movingAirplane.latitude, movingAirplane.longitude) z:400 transform: Rotation { origin { x: vehicleIconGlow.width / 2 + 26 y: vehicleIconGlow.height / 2 + 11 } axis {x: 0; y: 0; z: 1} angle: 265//movingAirplane.heading + 180 } sourceItem: Circle{ id: circle color: "white" width: image.width * .8 height: image.height * .8 border.color: "darkblue" //color: "transparent" } } Glow { anchors.fill:vehicleIconGlow radius: 8 samples: 17 color: Style.color_highlight source: vehicleIconGlow }
I've tried several other iterations--making the source and fill of the Glow object the circle rather than the vehicleIconGlow, putting the Glow object in the MapQuickItem, and all either render the same results, or simply do not display the glow at all. How can I get the vehicleIconGlow object to glow without duplicating it? Thank you!
-
Hi there, I'm trying to make a MapQuickItem that appears as a circle on a map glow, but when I apply glow to the MapQuickItem, it seems to duplicate the object separate from the original object like so:
Here is the code:
MapQuickItem { id: vehicleIconGlow anchorPoint.x: image.width anchorPoint.y: image.height coordinate: QtPositioning.coordinate(movingAirplane.latitude, movingAirplane.longitude) z:400 transform: Rotation { origin { x: vehicleIconGlow.width / 2 + 26 y: vehicleIconGlow.height / 2 + 11 } axis {x: 0; y: 0; z: 1} angle: 265//movingAirplane.heading + 180 } sourceItem: Circle{ id: circle color: "white" width: image.width * .8 height: image.height * .8 border.color: "darkblue" //color: "transparent" } } Glow { anchors.fill:vehicleIconGlow radius: 8 samples: 17 color: Style.color_highlight source: vehicleIconGlow }
I've tried several other iterations--making the source and fill of the Glow object the circle rather than the vehicleIconGlow, putting the Glow object in the MapQuickItem, and all either render the same results, or simply do not display the glow at all. How can I get the vehicleIconGlow object to glow without duplicating it? Thank you!
@abanksdev
you should set the source object visible to false.
Like in the examples -
@raven-worx which examples?
-
You could apply the
Glow
via thelayer
property instead of adding it as a sibling :MapQuickItem { //... sourceItem: Circle { // ... layer { enabled: true effect: Glow { radius: 8 samples: 17 color: Style.color_highlight } } } }
-
@raven-worx which examples?
@abanksdev said in Glow QML type duplicating object:
which examples?
like for any graphical effect QML type.
In your case, for Glow