Skip to content

ERate Rate ​

import EUI 1.0

Examples ​

Rate ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Half-star rating ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Properties ​

PropertyDescriptionValues and default
activeColorcolor

Active or selected color.

DefaultDynamic binding
allowHalfbool

Allow half-star ratings.

Defaultfalse
clearablebool

Show a clear action; ratings may be cleared by clicking the current score again.

Defaultfalse
colorsvar

Icons, colors or labels organized by rating range as arrays or mappings.

Default[]
disabledVoidColorcolor

Color of unselected rating icons; disabledVoidColor applies when disabled.

DefaultvoidColor
disabledVoidIconint

Icon used by the component.

EIcons.*
0 (no icon)

DefaultvoidIcon
enabledbool

Allow interaction; false disables the control.

Defaulttrue
halfIconint

Icon used by the component.

EIcons.*
0 (no icon)

DefaultEIcons.STAR_FILL
heightreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitHeight
highThresholdreal

Thresholds for low and high rating ranges.

Default4
hoverValuereal

Hovered date or rating used for preview.

Default-1
iconsvar

Icons, colors or labels organized by rating range as arrays or mappings.

Default[]
lowThresholdreal

Thresholds for low and high rating ranges.

Default2
maxint

Maximum rating and number of rating icons.

Default5
readOnlybool

Prevent user editing or rating while allowing programmatic value changes.

Defaultfalse
scoreTemplatestring

Rating display template; {value} is replaced by the current score.

Default"{value}"
showScorebool

Display rating text or score.

Defaultfalse
showTextbool

Show progress or rating text.

Defaultfalse
sizeint

Control size; inherits the nearest EConfigProvider by default.

EStyle.Small
EStyle.Medium
EStyle.Large

DefaultInherited; EStyle.Medium by default
textColorcolor

Text color.

DefaultDynamic binding
textsvar

Icons, colors or labels organized by rating range as arrays or mappings.

Default[]
validateEventbool

Request enclosing-form validation when the value changes.

Defaulttrue
valuereal

Current value; read or write through property bindings, with arrays for multiple or range selection.

Default0
visiblebool

Whether the component is visible.

Defaulttrue
voidColorcolor

Color of unselected rating icons; disabledVoidColor applies when disabled.

DefaultDynamic binding
voidIconint

Icon used by the component.

EIcons.*
0 (no icon)

DefaultEIcons.STAR
widthreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitWidth
currentColorcolorRead only

Resolved color from the theme, current state and custom palette.

DefaultComputed at runtime
currentIconintRead only

Icon associated with the current rating range.

EIcons.*
0: no explicit icon

DefaultComputed at runtime
currentScorerealRead only

Current rating including hover preview.

DefaultComputed at runtime

Signals ​

SignaturePurpose
rated(real value)

Emitted when the user rates an item; value is the selected score.

Methods ​

SignaturePurpose
resetCurrentValue()

End the rating preview and restore the selected rating.

setCurrentValue(nextValue)

Set the rating value used for the hover preview.

setRating(nextValue)

Set the rating using the component range and precision limits.

Released under the MIT License. Third-party assets retain their own licenses.