Hii everyone,
I have a login page (username + password), I want when I click on the button [B] Enter [/ B] after typing the password --> Log in as pressing Button Log in : 1.png
code Button Log in :
Rectangle{
property color previousColor: "transparent"
id: rectangle1
...
Text {
id: txtLogin
text: qsTr("LOG IN")
...
}
MouseArea{
id: mouse
anchors.fill: parent
onClicked: {
if(change.text=="USER")
{
if((textinputmod1.txt=="USER")&&(textinputmod2.txt=="1234"))
{
userPage.visible=true
}
else{
winIncId.visible= true
}
textinputmod1.txt= ""
textinputmod2.txt= ""
textinputmod1.focus=true
}
...
}
}
}
Rectangle{
property color previousColor: "transparent"
id: rectangle1
...
Text {
id: txtLogin
text: qsTr("LOG IN")
...
}
MouseArea{
id: mouse
anchors.fill: parent
onClicked: {
if(change.text=="USER")
{
if((textinputmod1.txt=="USER")&&(textinputmod2.txt=="1234"))
{
userPage.visible=true
}
else{
winIncId.visible= true
}
textinputmod1.txt= ""
textinputmod2.txt= ""
textinputmod1.focus=true
}
...
}
}
}
To copy to clipboard, switch view to plain text mode
code TextInput of password:
TextInputMod {
id: textinputmod2
textinput: "Password"
mode: TextInput.Password
...
}
}
TextInputMod {
id: textinputmod2
textinput: "Password"
mode: TextInput.Password
...
}
}
To copy to clipboard, switch view to plain text mode
Cheers,
Bookmarks