Qt Creator Documentation 2.8.0

Contents

QML VerticalCheckBoxList Element

A check box list that can be styled by font and image sources. The layout is vertical. More...

Properties

Detailed Description

The VerticalCheckBoxList type provides a multi-selection check box group that is arranged in a vertical layout.

Here is a simple VerticalCheckListBox:

 import QtQuick 1.1
 import "components"

 VerticalCheckBoxList {
     id: checkbox_list1
     textColor: "#000000"
     font.family: "Arial"
     font.bold: false
     font.pixelSize: 16
     imageHeight: 28
     imageWidth: 28
     spacing: 4
     itemSpacing: 8

     model: ListModel {
         ListElement {
             item_value: "1"
             item_text: "check 1"
             item_checked: true
         }

         ListElement {
             item_value: "2"
             item_text: "check 2"
             item_checked: false
         }
     }
     imageUnChecked: "images/checkbox.bmp"
     imageChecked: "images/checkbox_click.bmp"

     onValuesChanged: {

     }
 }

Property Documentation

font : font

The font properties for the check list item text.


imageChecked : string

The source image for the check list item checked state.


imageHeight : int

The height of the images used for the checked and unchecked state.


imageUnChecked : string

The source image for the check list item unchecked state.


imageWidth : int

The width of the images used for the checked and unchecked state.


model : model

The data model used for the check list box items.

It must be in this format: ListModel { ListElement { item_value: "1" item_text: "check 1" item_checked: true }

ListElement { item_value: "2" item_text: "check 2" item_checked: false } }


textColor : string

The text color for the check list item text.


values : model

The data model used to store the selected values of the control.