ScalableBorderImage QML Type

The scalable border image component of Neptune 3. More...

Since: Qt 5.11
Inherits:

Item

Properties

Detailed Description

The ScalableBorderImage provides a BorderImage that scales according to Sizes.scale. It enables a BorderImage to stretch or shrink to support any pixel density.

See Neptune 3 UI Components and Interfaces to see more available components in Neptune 3 UI.

Example Usage

The following example uses ScalableBorderImage:

import QtQuick 2.10
import shared.controls 1.0

Item {
    id: root

    ScalableBorderImage {
        id: topImage
        source: "app-fullscreen-top-bg"
    }
}

Property Documentation

asynchronous : bool

Specifies that images on the local filesystem should be loaded asynchronously in a separate thread. The default value is false, causing the user interface thread to block while the image is loaded. Setting asynchronous to true is useful where maintaining a responsive user interface is more desirable than having images immediately visible.

Note that this property is only valid for images read from the local filesystem. Images loaded via a network resource (e.g. HTTP) are always loaded asynchronously.


border : var

This property holds the current selected index of the tools column.

This property's default is 0.


cache : bool

Specifies whether the image should be cached. The default value is true. Setting cache to false is useful when dealing with large images, to make sure that they aren't cached at the expense of small 'ui element' images.


horizontalTileMode : enumeration

This property describes how to repeat or stretch the middle parts of the border image.


mirror : bool

This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image).

This property's default is false.


progress : real

This property holds the progress of image loading, from 0.0 (nothing loaded) to 1.0 (finished).


smooth : bool

This property holds whether the image is smoothly filtered when scaled or transformed. Smooth filtering gives better visual quality, but it may be slower on some hardware. If the image is displayed at its natural size, this property has no visual or performance effect.

By default, this property is set to true.


source : url

This property holds the URL that refers to the source image.

BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.

This property can also be used to refer to .sci files, which are written in a QML-specific, text-based format that specifies the borders, the image file and the tile rules for a given border image.


sourceSize : QSize

This property holds the actual width and height of the loaded image.


status : enumeration

This property describes the status of image loading. It can be one of:


verticalTileMode : enumeration

This property describes how to repeat or stretch the middle parts of the border image.

  • BorderImage.Stretch - Scales the image to fit to the available area.
  • BorderImage.Repeat - Tile the image until there is no more space. May crop the last image.
  • BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.

© 2019 Luxoft Sweden AB. 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.