AppPaper

A sheet of paper with shadow. More...

Import Statement: import VPlayApps 1.0
Inherits:

Item

Properties

Detailed Description

The AppPaper offers a material style sheet of paper with shadow, which can also be elevated. This is a base component of the AppCard.

 import VPlayApps 1.0
 import QtQuick 2.0

 App {
   Page {
     AppPaper {
       anchors.centerIn: parent
       width: dp(300)
       height: appText.height

       AppText {
         id: appText
         width: parent.width
         padding: dp(15)
         text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
       }
     }
   }
 }

Property Documentation

background : alias

Alias to the Rectangle item used for the background.

This QML property was introduced in V-Play 2.18.1.


elevated : bool

Use this property to add elevation to the paper. An example usage would be:

 Page {
   Paper {
     anchors.centerIn: parent
     width: dp(200)
     height: dp(200)
     elevated: mouseArea.pressed // elevate the card if it is pressed

     MouseArea {
       id: mouseArea
       anchors.fill: parent
     }
   }
 }

This QML property was introduced in V-Play 2.18.1.


radius : real

The radius used for the edges. This changes both the background radius as well as the shadow radius. It is recommended to use values below dp(15), as this also influences the shadow spread. Higher values might lead to large shadows, so use carefully. Note that this radius does not automatically clip the content of the paper.

This QML property was introduced in V-Play 2.18.1.


shadow : alias

Alias to the RectangularGlow item used to create the shadow.

This QML property was introduced in V-Play 2.18.1.


shadowColor : color

The shadow color. The default value is "#70000000" by default.

This QML property was introduced in V-Play 2.18.1.


shadowOffsetDefault : real

The default vertical shadow offset, if the card is not elevated. This is set to dp(1) by default.

This QML property was introduced in V-Play 2.18.1.


shadowOffsetElevated : real

The vertical shadow offset, if the card is elevated. This is set to dp(5) by default.

This QML property was introduced in V-Play 2.18.1.


shadowSizeDefault : real

The default shadow size, if the card is not elevated. This is set to dp(3) by default.

This QML property was introduced in V-Play 2.18.1.


shadowSizeElevated : real

The shadow size, if the card is elevated. This is set to dp(8) by default.

This QML property was introduced in V-Play 2.18.1.


Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support