Enginio 1.0
-
Error
http://prntscr.com/jzhiji
PageLeves.qmlimport QtQuick 2.1
import Enginio 1.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0ColumnLayout {
EnginioOAuth2Authentication {
id: identity
user: login.text
password: password.text
}
anchors.fill: parent
anchors.margins: 3
spacing: 3TextField { id: login Layout.fillWidth: true placeholderText: "Username" enabled: enginioClient.authenticationState == Enginio.NotAuthenticated } TextField { id: password Layout.fillWidth: true placeholderText: "Password" echoMode: TextInput.PasswordEchoOnEdit enabled: enginioClient.authenticationState == Enginio.NotAuthenticated } Button { id: proccessButton Layout.fillWidth: true } TextArea { id: data text: "Not logged in.\n\n" readOnly: true Layout.fillHeight: true Layout.fillWidth: true Connections { target: enginioClient onSessionAuthenticated: { data.text = data.text + "User '"+ login.text +"' is logged in.\n\n" + JSON.stringify(reply.data, undefined, 2) + "\n\n" } onSessionAuthenticationError: { data.text = data.text + "Authentication of user '"+ login.text +"' failed.\n\n" + JSON.stringify(reply.data, undefined, 2) + "\n\n" } onSessionTerminated: { data.text = data.text + "Session closed.\n\n" } } } states: [ State { name: "NotAuthenticated" when: enginioClient.authenticationState == Enginio.NotAuthenticated PropertyChanges { target: proccessButton text: "Login" onClicked: { enginioClient.identity = identity } } }, State { name: "Authenticating" when: enginioClient.authenticationState == Enginio.Authenticating PropertyChanges { target: proccessButton text: "Authenticating..." enabled: false } }, State { name: "AuthenticationFailure" when: enginioClient.authenticationState == Enginio.AuthenticationFailure PropertyChanges { target: proccessButton text: "Authentication failed, restart" onClicked: { enginioClient.identity = null } } }, State { name: "Authenticated" when: enginioClient.authenticationState == Enginio.Authenticated PropertyChanges { target: proccessButton text: "Logout" onClicked: { enginioClient.identity = null } } } ]
}
-
Error
http://prntscr.com/jzhiji
PageLeves.qmlimport QtQuick 2.1
import Enginio 1.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0ColumnLayout {
EnginioOAuth2Authentication {
id: identity
user: login.text
password: password.text
}
anchors.fill: parent
anchors.margins: 3
spacing: 3TextField { id: login Layout.fillWidth: true placeholderText: "Username" enabled: enginioClient.authenticationState == Enginio.NotAuthenticated } TextField { id: password Layout.fillWidth: true placeholderText: "Password" echoMode: TextInput.PasswordEchoOnEdit enabled: enginioClient.authenticationState == Enginio.NotAuthenticated } Button { id: proccessButton Layout.fillWidth: true } TextArea { id: data text: "Not logged in.\n\n" readOnly: true Layout.fillHeight: true Layout.fillWidth: true Connections { target: enginioClient onSessionAuthenticated: { data.text = data.text + "User '"+ login.text +"' is logged in.\n\n" + JSON.stringify(reply.data, undefined, 2) + "\n\n" } onSessionAuthenticationError: { data.text = data.text + "Authentication of user '"+ login.text +"' failed.\n\n" + JSON.stringify(reply.data, undefined, 2) + "\n\n" } onSessionTerminated: { data.text = data.text + "Session closed.\n\n" } } } states: [ State { name: "NotAuthenticated" when: enginioClient.authenticationState == Enginio.NotAuthenticated PropertyChanges { target: proccessButton text: "Login" onClicked: { enginioClient.identity = identity } } }, State { name: "Authenticating" when: enginioClient.authenticationState == Enginio.Authenticating PropertyChanges { target: proccessButton text: "Authenticating..." enabled: false } }, State { name: "AuthenticationFailure" when: enginioClient.authenticationState == Enginio.AuthenticationFailure PropertyChanges { target: proccessButton text: "Authentication failed, restart" onClicked: { enginioClient.identity = null } } }, State { name: "Authenticated" when: enginioClient.authenticationState == Enginio.Authenticated PropertyChanges { target: proccessButton text: "Logout" onClicked: { enginioClient.identity = null } } } ]
}
@123456789 I never used this Enginio, but it looks like you did not install it, right?
Did you check http://doc.qt.io/archives/qt-5.5/enginio-getting-started.html ? -
Which Qt version are you using? Are you sure you have enginio installed?
-
-
Enginio is not supported in Qt 5.10 anymore. It was deprecated in Qt 5.6.
-
@123456789
Hi
That Qt service is dead as far as i know.
You can pick any other cloud service that offer the features you want.
There is nothing predefined from Qt. -
@123456789
But Sqllite is a local database.
You need nothing like Enginio to use it.
Its simply just to create db and store data in it using SQL.
Small demo project
https://www.dropbox.com/s/uo43f7sbiwcjazv/mySqlite.zip?dl=0 -
@123456789
Ok
So you are looking for something like
http://doc.qt.io/qt-5/qtquick-localstorage-qmlmodule.html
?examples
http://doc.qt.io/qt-5/qtquick-localstorage-example.html -
yes
but i use, exemple QT
http://doc.qt.io/archives/qt-5.5/qtenginioqml-users-login-qml.html -
yes
but i use, exemple QT
http://doc.qt.io/archives/qt-5.5/qtenginioqml-users-login-qml.html@123456789
Ok. but as far as i know Enginio is closed.
http://blog.qt.io/blog/2016/01/26/notification-for-all-qt-cloud-services-users/
so it cant possible work in 2018. -
@123456789
Yes, you need to read the docs about storage for QML
and then decided if that is what you need.
Then adapt the code you have to use the
LocalStorage QML classes.
There is none effort, just run solution for this.
The sample you are using in archived which means its not up to date.
So depending what you task is, i think LocalStorage is right for you.