Dear All,
is possible to check the signIn status in the portal?
A lot of example uses the default Dialog Box for the login.
I created a custom qml for the login.
How is it possible to check if the login are going successfully or not?
import QtQuick 2.3
import QtQuick.Controls 2.0
import Esri.ArcGISRuntime 100.0
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "TestMapQtNEW"
Frame {
id: frmLogin
x: 203
y: 200
width: 394
height: 200
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenterOffset: 0
anchors.horizontalCenter: parent.horizontalCenter
opacity: 1
clip: false
Label {
id: lblPassword
x: 53
y: 80
text: qsTr("Password:")
}
Label {
id: lblUsername
x: 53
y: 49
text: qsTr("Username:")
}
TextField {
id: txtPassword
x: 132
y: 74
placeholderText: qsTr("Text Field")
}
TextField {
id: txtUsername
x: 132
y: 43
placeholderText: qsTr("Text Field")
}
Portal {
id: myPortal
url: "http://www.arcgis.com"
}
Button {
id: btnLogin
x: 232
y: 125
text: qsTr("Login")
onClicked: {
var credential = ArcGISRuntimeEnvironment.createObject("Credential", {username:txtUsername.text, password:txtPassword.text});
myPortal.credential = credential;
myPortal.signIn();
//AND NOW? HOW I CAN CHECK THE STATUS AND/OR THE ERROR?
}
}
}
// add a mapView component
}
Hi Eric and thanks for the reply.
The Portal Object don't have obSignInError. Please note that i using the ArcGIS SDK for QT Quartz Beta:
This are the list of Properties, Signals and Methods:
I tried to check the Bool SignedIn but the result is ever FALSE.
Could you please take a look?
Dear Eric,
sorry for my second reply.
seems that this solution could be solve my problem.
Could you please take a look?
onSignInStatusChanged:{
switch (portal1.signInStatus){
case 1:break;case 2:txtError.text = "Login Success";break;case 3:txtError.text = "Login ERROR";break;default:break;}
}