TypeError: Type error realValue.toFixed



  • Hey guys,

    I have a problem with real to string conversion in qml.
    I have a slider and I want to assign the sliderValue to a textFields' text.

    Slider {
       id: ampSlider
    ...
       onValueChanged: txtAmplitude.text = ampSlider.value.toFixed(1)
    }
    

    At runtime I get this error-message: qrc:/ControlTab.qml:151: TypeError: Type error

    I don't see whats wrong here.



  • Hi,

    Try to do it. instead of use ampSlider.value.toFixed(1) use just value.toFixed(1)

    Best regards.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.