diff --git a/app/qml/root.qml b/app/qml/root.qml index 56dc32f..7b5e3dc 100644 --- a/app/qml/root.qml +++ b/app/qml/root.qml @@ -21,15 +21,15 @@ import QtQuick 2.2 import QtQuick.Window 2.1 QtObject { - id: root + id: root property int terminalCount - - function newWindow() { - var component = Qt.createComponent("main.qml") - var window = component.createObject() - window.show() + + function newWindow() { + var component = Qt.createComponent("main.qml") + var window = component.createObject() + window.show() terminalCount = terminalCount + 1 - } + } function closeWindow() { terminalCount = terminalCount - 1 if (terminalCount == 0) { @@ -38,6 +38,6 @@ QtObject { } Component.onCompleted: { terminalCount = 0 - root.newWindow() - } + root.newWindow() + } }