Control QML Type
A user interface control. More...
|Import Statement:||import Qt.labs.controls 1.0|
|Inherited By:|| |
AbstractButton, BusyIndicator, ComboBox, Container, DayOfWeekRow, Dial, MenuItem, MonthGrid, Page, PageIndicator, Pane, ProgressBar, RangeSlider, ScrollBar, ScrollIndicator, Slider, SpinBox, StackView, Tumbler, and WeekNumberColumn
- availableHeight : real
- availableWidth : real
- background : Item
- bottomPadding : real
- contentItem : Item
- focusReason : enumeration
- font : font
- leftPadding : real
- locale : Locale
- mirrored : bool
- padding : real
- rightPadding : real
- spacing : real
- topPadding : real
Control is the base type of user interface controls.
Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.
background : Item
This property holds the background item.
Note: If the background item has no explicit size specified, it automatically follows the control's size. In most cases, there is no need to specify width or height for a background item.
contentItem : Item
This property holds the visual content item.
Note: The content item is automatically resized inside the padding of the control.
This property holds the reason of the last focus change.
Note: This property does not indicate whether the control has active focus, but the reason why the control either gained or lost focus.
|A mouse action occurred.|
|The Tab key was pressed.|
|A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab.|
|The window system made this window either active or inactive.|
|The application opened/closed a pop-up that grabbed/released the keyboard focus.|
|The user typed a label's buddy shortcut|
|The menu bar took focus.|
|Another reason, usually application-specific.|
See also Item::activeFocus.
font : font
This property holds the font currently set for the control.
This property describes the control's requested font. The font is used by the control's style when rendering standard components, and is available as a means to ensure that custom controls can maintain consistency with the native platform's native look and feel. It's common that different platforms, or different styles, define different fonts for an application.
The default font depends on the system environment. ApplicationWindow maintains a system/theme font which serves as a default for all controls. There may also be special font defaults for certain types of controls. You can also set the default font for controls by passing a custom font to QGuiApplication::setFont(), before loading the QML. Finally, the font is matched against Qt's font database to find the best match.
Control propagates explicit font properties from parent to children. If you change a specific property on a control's font, that property propagates to all of the control's children, overriding any system defaults for that property.
locale : Locale
© 2017 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.