import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
import "myfile.js" as Myfunc
Window {
    id: win
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")
    GroupBox {
        id: group
        title: "Joining us for which one?"
        font.pixelSize:  20
        Column {
            spacing: 10
            CheckBox {
                id: brFast
                text: "Breakfast"
                checked: true
            }
            CheckBox {
                id: lunch
                text: "Lunch"
                checked: false
            }
            CheckBox {
                id: dinner
                text: "Dinner"
                checked: true
            }
        }
    }
    Row {
         id:buttonRow
         anchors.top: group.bottom
         anchors.topMargin: 10
         spacing: 2
      Button {
         id: but1
         font.pixelSize: 20
         text: "Change Window Title"
         property string msg: "Qt Quick Framework"
         onClicked: Myfunc.test(msg)
      }
      Button {
          id: submit
          font.pixelSize: 20
          text: "Submit"
          property string msg: ""
          onClicked: Myfunc.selection(msg)
      }
      Button {
        id: quit
        text: "Quit"
        font.pixelSize: 20
        onClicked: Qt.quit()
      }
    }
    Label {
        id: result
        anchors.top: buttonRow.bottom
        anchors.topMargin: 10
        text: ""
        font.pixelSize: 20
        color: "blue"
    }
}
