Files
qt-creator/share/qtcreator/welcomescreen/components/CheckBox.qml
Daniel Molkentin 497dd323ea Introduce QML-based welcome screen using desktop components
Implements new XML-based format for examples, demos & tutorials

Done-with: Primrose Mbanefo <ext-primrose.mbanefo@nokia.com>
Change-Id: I42c0afdb419cffe5637cd4f298e828d09e0fb15a
Reviewed-on: http://codereview.qt.nokia.com/840
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-06-29 00:31:47 +02:00

27 lines
615 B
QML

import QtQuick 1.0
import "custom" as Components
import "plugin"
// jb : Size should not depend on background, we should make it consistent
Components.CheckBox{
id:checkbox
property string text
property string hint
height:20
width: Math.max(110, backgroundItem.textWidth(text) + 40)
background: QStyleItem {
elementType:"checkbox"
sunken:pressed
on:checked || pressed
hover:containsMouse
text:checkbox.text
enabled:checkbox.enabled
focus:checkbox.focus
hint:checkbox.hint
}
Keys.onSpacePressed:checked = !checked
}