FlipableItem QML Type
Provides a surface that can be flipped. More...
Import Statement: | import QtQuick.Studio.Components |
Since: | QtQuick.Studio.Components 1.0 |
Inherits: |
Properties
- flipAngle : alias
- flipped : bool
- opacityBack : real
- opacityFront : real
- rotationalAxis : int
Detailed Description
A Flipable type can be visibly flipped between its front and back sides, like a card. The front and back sides are specified by using any two types inside the Flipable type. The type with the higher z-order is the front side. The opacityFront and opacityBack properties are used to hide and show either the front or back side of the item at a time.
The flipAngle property is used to animate the angle of the type to produce the flipping effect. The value of the rotationalAxis property determines which axis the type is rotated around.
Example Usage
You can use the Flipable component in Qt Design Studio to create an item that can be flipped.
The QML code looks as follows:
FlipableItem { id: flipable x: 595 y: 277 width: 493 height: 493 opacityFront: 1 opacityBack: 0.09412 flipAngle: 45 rotationalAxis: 1 TriangleItem { id: triangle x: 122 y: 122 width: 250 height: 250 opacity: 1 z: 0 strokeWidth: 10 fillColor: "#6cff9f" rotation: -270 } TriangleItem { id: triangle1 x: 16 y: 122 width: 250 height: 250 strokeWidth: 10 rotation: 270 fillColor: "#6cff9f" } }
Property Documentation
flipAngle : alias |
The flip angle in degrees.
The minimum value is -360 and the maximum value is 360 degrees.
flipped : bool |
Whether the type has been flipped.
This property is set to true
when the type is flipped.
opacityBack : real |
The opacity of the back side of the type.
The opacity can be set between 0 and 1 to hide or show the items on the back side of the type.
opacityFront : real |
The opacity of the front side of the type.
The opacity can be set between 0 and 1 to hide or show the items on the front side of the type.
rotationalAxis : int |
Whether the type is rotated around the x-axis or y-axis.
This property is set to 0 to rotate the type around the x-axis or to 1 to rotate around the y-axis.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.