From be390c450c10b6510efdb6d2b868992ca718ac8f Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Mon, 28 Jun 2021 20:31:42 +0200 Subject: [PATCH] Pop PrinterPage if printer (attrs) goes missing --- qml/pages/PrinterPage.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qml/pages/PrinterPage.qml b/qml/pages/PrinterPage.qml index 2ae48da..19fef79 100644 --- a/qml/pages/PrinterPage.qml +++ b/qml/pages/PrinterPage.qml @@ -24,6 +24,15 @@ Page { } } + Connections { + target: printer + onAttrsChanged: { + if(Object.keys(printer.attrs).length === 0) { + pageStack.pop() + } + } + } + // To enable PullDownMenu, place our content in a SilicaFlickable SilicaFlickable { anchors.fill: parent