diff --git a/modules/gui/qt/widgets/qml/StackViewExt.qml b/modules/gui/qt/widgets/qml/StackViewExt.qml
index 1f7d37fabcbf2c8c442964ddd0d6051d2e6feaaa..e29919f87478950f6e7b0075dc3ab0a4632f4553 100644
--- a/modules/gui/qt/widgets/qml/StackViewExt.qml
+++ b/modules/gui/qt/widgets/qml/StackViewExt.qml
@@ -79,6 +79,10 @@ StackView {
         {
             var model = viewModel[tab]
             if (model.name === view) {
+                if (model.guard !== undefined && typeof model.guard === "function" && !model.guard(viewProperties)) {
+                    continue //we're not allowed to load this page
+                }
+
                 //we can't use push(url, properties) as Qt interprets viewProperties
                 //as a second component to load
                 var component = undefined