Qt Quick Components

Style

  • List of all members, including inherited members
  • Properties

    Detailed Description

    This class contains Symbian platform specific style parameters for fonts, colors and layouts. These parameters should be used if you want to make your UI consistent with the platform style.

    Symbian style is exposed as a context property called "platformStyle". It is not possible to instantiate a Style object in QML, but the style must be accessed through the context property.

    Here's an example of how to use the parameters:

     Item {
         width: text.width + icon.width + platformStyle.paddingSmall + 2 * platformStyle.paddingMedium
         height: Math.max(text.height, icon.height) + 2 * platformStyle.paddingMedium
    
         Image {
             id: icon
             anchors.left: parent.left
             anchors.leftMargin: platformStyle.paddingMedium
             anchors.verticalCenter: parent.verticalCenter
             width: platformStyle.graphicSizeSmall
             height: platformStyle.graphicSizeSmall
             ...
         }
    
         Text {
             id: text
             anchors.left: icon.right
             anchors.leftMargin: platformStyle.paddingSmall
             anchors.right: parent.right
             anchors.rightMargin: platformStyle.paddingMedium
             anchors.verticalCenter: parent.verticalCenter
             font.family: platformStyle.fontFamilyRegular
             font.pixelSize: platformStyle.fontSizeLarge
             color: platformStyle.colorNormalLight
             ...
         }
     }

    The actual return values of the properties may vary between device configurations, e.g. if the resolutions of two devices are different it is probable that the pixel values of the properties are different.

    Property Documentation

    borderSizeMedium : int

    Size for medium sized border parts of a BorderImage in pixels.


    colorChecked : color

    Foreground color for checked state.


    colorDisabledDark : color

    Dark foreground color for disabled state.


    colorDisabledLight : color

    Light foreground color for disabled state.


    colorDisabledMid : color

    Mid foreground color for disabled state.


    colorHighlighted : color

    Foreground color for a highlighted item.


    colorNormalDark : color

    Default dark foreground color.


    colorNormalLight : color

    Default light foreground color.


    colorNormalLink : color

    Default link (e.g. an URL) foreground color.


    colorNormalMid : color

    Default mid foreground color.


    colorPressed : color

    Foreground color for pressed state.


    colorTextSelection : color

    Background color for a selected item.


    fontFamilyRegular : string

    Default font family.


    fontSizeLarge : int

    Pixel size for large font.


    fontSizeMedium : int

    Pixel size for medium font.


    fontSizeSmall : int

    Pixel size for small font.


    graphicSizeLarge : int

    Size of a large graphic (e.g. an Image) in pixels.


    graphicSizeMedium : int

    Size of a medium graphic (e.g. an Image) in pixels.


    graphicSizeSmall : int

    Size of a small graphic (e.g. an Image) in pixels.


    graphicSizeTiny : int

    Size of a tiny graphic (e.g. an Image) in pixels.


    paddingLarge : int

    Size of a large padding in pixels.


    paddingMedium : int

    Size of a medium padding in pixels.


    paddingSmall : int

    Size of a small padding in pixels.