ButtonStyle properties and default values explained More...
Inherits Style
Inherited by GroupButtonStyle, ListButtonStyle, NegativeButtonStyle, PositiveButtonStyle, SheetButtonAccentStyle, SheetButtonStyle, TabButtonStyle, ToolButtonStyle, and TumblerButtonStyle.
This element was introduced in qt-components 4.7.
Custom platformStyle example
Button { platformStyle: ButtonStyle { fontFamily: "Arial" fontPixelSize: 21 fontCapitalization: Font.SmallCaps fontWeight: Font.Light horizontalAlignment: Text.AlignLeft textColor: "black" pressedTextColor: "red" disabledTextColor: "gray" checkedTextColor: "blue" buttonWidth: 200 buttonHeight: 30 position: "[horizontal-center]" } }
background : string |
Property default value is "image://theme/meegotouch-button"+__invertedString+"-background"+(position?"-"+position:"").
Defines the default background image.
backgroundMarginBottom : int |
Property default value is 22.
Defines the background image bottom margin.
backgroundMarginLeft : int |
Property default value is 22.
Defines the background image left margin.
backgroundMarginRight : int |
Property default value is 22.
Defines the background image right margin.
backgroundMarginTop : int |
Property default value is 22.
Defines the background image top margin.
buttonHeight : int |
Property default value is UI.BUTTON_HEIGHT.
Defines the button height.
buttonWidth : int |
Property default value is UI.BUTTON_WIDTH.
Defines the button width.
checkedBackground : string |
Property default value is "image://theme/meegotouch-button"+__invertedString+"-background-selected"+(position?"-"+position:"").
Defines the checked state background image.
checkedDisabledBackground : string |
Property default value is "image://theme/meegotouch-button"+__invertedString+"-background-disabled-selected"+(position?"-"+position:"").
Defines the disabled checked state background image.
checkedTextColor : color |
Property default value is UI.COLOR_BUTTON_INVERTED_FOREGROUND.
Defines the text colour, which is shown when the button is checked.
disabledBackground : string |
Property default value is "image://theme/meegotouch-button"+__invertedString+"-background-disabled"+(position?"-"+position:"").
Defines the disabled state background image.
disabledTextColor : color |
Property default value is UI.COLOR_BUTTON_DISABLED_FOREGROUND.
Defines the text colour, which is shown when the button is disabled.
fontCapitalization : int |
Property default value is Font.MixedCase.
Defines the font capitalization.
fontFamily : string |
Property default value is UI.FONT_FAMILY.
Defines the font family for the button.
fontPixelSize : int |
Property default value is UI.FONT_DEFAULT_SIZE.
Defines the font pixel size.
fontWeight : int |
Property default value is Font.Bold.
Defines the font weight.
horizontalAlignment : int |
Property default value is Text.AlignHCenter.
Defines the text horizontal alignment.
mouseMarginBottom : real |
Property default value is 0.0.
Defines mouse area bottom margin.
mouseMarginLeft : real |
Property default value is 0.0.
Defines the mouse area left margin.
mouseMarginRight : real |
Property default value is 0.0.
Defines the mouse area right margin.
mouseMarginTop : real |
Property default value is 0.0.
Defines the mouse area top margin.
position : string |
Property default value is "".
Defines the button position.
Following values are used to define position:
pressedBackground : string |
Property default value is "image://theme/meegotouch-button"+__invertedString+"-background-pressed"+(position?"-"+position:"").
Defines the pressed state background image.
pressedTextColor : color |
Property default value is UI.COLOR_BUTTON_SECONDARY_FOREGROUND.
Defines the text colour, which is shown when the button is pressed.
textColor : color |
Property default value is "inverted ? UI.COLOR_BUTTON_INVERTED_FOREGROUND : UI.COLOR_BUTTON_FOREGROUND".
Defines the colour of the text.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.