Add Async/Sync functions to post lambda on model thread. Fix missing defines on headers. Move Login c++ logic into core for MVVM. Write async login. Auto core iterate (30ms). Clean exit by stopping core before deletion.
25 lines
405 B
QML
25 lines
405 B
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.0
|
|
import Linphone
|
|
|
|
Item{
|
|
id: mainItem
|
|
ColumnLayout{
|
|
anchors.fill: parent
|
|
Text{
|
|
Layout.fillWidth: true
|
|
text: LoginPageCpp.isLogged ? "Online" : "Offline"
|
|
}
|
|
RowLayout{
|
|
Button{
|
|
text: 'Sign In'
|
|
onClicked: LoginPageCpp.login("myusername", "passy")
|
|
}
|
|
Button{
|
|
text: 'Sign Out'
|
|
onClicked: console.log("Click!")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|