I have these 2 buttons and I want to click on both to open the onClick action of the second button. How can I do that to get my desired result? Maybe to use signals?
Button { id: btnLevel1 x: 1016 y: 492 width: 554 height: 67 onClicked: classA.newGameWindow() text: "May God\nHave Mercy" background: Rectangle { color: "transparent" } font.family: "Inria Serif" font.pixelSize: 20}Text { id: very_hard_level color: "white" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop wrapMode: Text.Wrap font.weight: Font.Normal}Button { id: btn2 x: 58 y: 246 width: 188 height: 34 onClicked: classA.newGameWindow() text: qsTr("New Game") background: Rectangle { color: "transparent" } font.family: "Inria Serif" font.pixelSize: 26 Text { id: new_Game color: "white" horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignTop wrapMode: Text.Wrap font.weight: Font.Normal }}
I tried to use MouseArea but didn't work and I don't know what to do