linphone-desktop/Linphone/view/App/Main.qml
Julien Wadel 154a322dd3 Use replace instead of pop/push in order to destroy the Welcome page.
The first pop will do nothing as the welcome page is the initial item.
2023-10-25 14:02:54 +00:00

40 lines
No EOL
687 B
QML

import QtQuick 2.15
import QtQuick.Layouts 1.3
import QtQuick.Controls
import Linphone
//import UI 1.0
Window {
id: mainWindow
width: 960
height: 600
visible: true
title: qsTr("Linphone")
StackView {
id: mainWindowStackView
anchors.fill: parent
initialItem: welcomePage
}
Component {
id: welcomePage
WelcomePage {
onStartButtonPressed: {
mainWindowStackView.replace(loginPage)// Replacing the first item will destroy the old.
}
}
}
Component {
id: loginPage
LoginPage {
onUseSIPButtonClicked: mainWindowStackView.push(sipLoginPage)
}
}
Component {
id: sipLoginPage
SIPLoginPage {
onReturnToLogin: mainWindowStackView.pop()
}
}
}