Qt Creator Documentation 2.8.0

Contents

QML HorizontalRadioButtonList Element

A radio button list that can be styled by font and image sources, and has a horizontal layout. More...

Properties

Detailed Description

The HorizontalRadioButtonList type provides a one-select radio button group that is arranged in a horizontal layout.

Here is a simple HorizontalRadioButtonList:

 import QtQuick 1.1
 import "components"

 HorizontalRadioButtonList {
     id: radiobutton_list2
     textColor: "#000000"
     font.family: "Arial"
     font.bold: false
     font.pixelSize: 16
     spacing: 4
     itemSpacing: 10
     model: ListModel {
         ListElement {
             item_value: "1"
             item_text: "radio 1"
             item_checked: true
         }

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

     imageUnChecked: "images/radiobutton.png"
     imageChecked: "images/radiobutton_click.png"

     onValueChanged: {
         console.debug(value);
     }
 }

Property Documentation

font : font

The font properties for the radio list item text.


imageChecked : string

The source image for the radio list item checked state.


imageUnChecked : string

The source image for the radio list item unchecked state.


itemSpacing : int

The spacing between each radio item in the list.


spacing : int

The spacing between the radio item image and the radio item text.


textColor : string

The text color for the radio list item text.


value : string

The value selected or set for the radio list.