From 933f36fa9fc06eca7768f0cb4d5571c0485ee25c Mon Sep 17 00:00:00 2001 From: "pls.153" Date: Sat, 18 Oct 2025 16:51:19 +0200 Subject: [PATCH] revision of example 'debug-ui' --- examples/debug-ui/lisp/main.lisp | 6 ++++-- examples/debug-ui/qml/main.qml | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/examples/debug-ui/lisp/main.lisp b/examples/debug-ui/lisp/main.lisp index d37504c..0a2e343 100644 --- a/examples/debug-ui/lisp/main.lisp +++ b/examples/debug-ui/lisp/main.lisp @@ -1,4 +1,6 @@ (in-package :app) -;; intentional division by zero after 5 seconds -(qsingle-shot 5000 (lambda () (dotimes (i 1) (/ 1 i)))) +(defun crash? () + (funcall 'no-such-function)) + +(qsingle-shot 10000 'crash?) diff --git a/examples/debug-ui/qml/main.qml b/examples/debug-ui/qml/main.qml index 6f3fcf7..312ea6d 100644 --- a/examples/debug-ui/qml/main.qml +++ b/examples/debug-ui/qml/main.qml @@ -23,15 +23,22 @@ StackView { // fonts (must stay here, before using them below) - FontLoader { id: fontHack; source: "fonts/Hack-Regular.ttf" } // code + FontLoader { id: fontHack; source: "fonts/Hack-Regular.ttf" } FontLoader { id: fontHackBold; source: "fonts/Hack-Bold.ttf" } - FontLoader { id: fontAwesome; source: "fonts/fontawesome-webfont.ttf" } // icons // items Rectangle { id: mainRect - color: "lavender" + color: "orange" + + Button { + id: button + anchors.centerIn: parent + text: "Click (or wait 10 seconds)" + + onClicked: Lisp.call("app:crash?") + } } // dialogs