qml-old/examples/helloworld.scm

25 lines
689 B
Scheme
Raw Normal View History

2022-02-03 14:02:59 +00:00
(import
(qml core)
coops)
2021-04-10 09:43:03 +00:00
(gui-application-create)
(define engine (make <QQmlApplicationEngine>))
(define (windowLoadCallback cbdata argv) void
(print cbdata)
(print "Loaded QML file: " (to (cadr argv) string:)))
2022-02-03 14:02:59 +00:00
(define callback-data "Test")
2022-02-03 14:02:59 +00:00
(define conn (connect-lambda-static engine "objectCreated(QObject*,QUrl)"
windowLoadCallback
2022-02-03 14:02:59 +00:00
callback-data
(qt-connection-type auto:)))
(define loc (new-QUrl "examples/helloworld.qml"))
(load-url engine loc)
2021-04-10 09:43:03 +00:00
(do ((loop #t))
((not loop) #t)
(process-events-timed (qevent-loop-process-event-flag process-all-events:) 50))