How to connect Radio Button Action (QML Code) with Text Widget

Dear Members!
Radio Buttons are not in Flipabit Application. We can Create them with New Component Widget in Flipabit and Its associated action to the T Text Widget .
Here is the QML code and respective Project with Illustrative video.


Radio Buttons Group Customised with Text Widget.flp (6.1 KB)
import QtQuick 2.15
import QtQuick.Controls 2.15
Item{

Column {
    spacing: 10
    RadioButton {
        id: radioButton1
        text: "Option 1"
        onClicked: document.childByName("Txt").content.scriptAdaptor.actionSetText("Option 1 selected")
    }
    RadioButton {
        id: radioButton2
        text: "Option 2"
        onClicked: document.childByName("Txt").content.scriptAdaptor.actionSetText("Option 2 selected") 
    }
    RadioButton {
        id: radioButton3
        text: "Option 3"
                    onClicked: document.childByName("Txt").content.scriptAdaptor.actionSetText("Option 3 selected")
    }
}

}

1 Like

Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.