import QtQuick.Window 2.0
property string windowTitle: "My New Title"
property bool windowReady: typeof window != 'undefined'
onWindowReadyChanged: {
// Setup a connection to QWindow::onWindowTitleChanged
// because MainView.AppHeader might override this custom
// title as it's no completed yet. This way we can be sure to flip it back to
// the correct value. This is super ugly!!!
windowConnection.target = window
window.title = windowTitle
}
Connections {
id: windowConnection
onWindowTitleChanged: {
if (title !== windowTitle) {
window.title = windowTitle
}
}
}