mirror of https://github.com/status-im/nimqml.git
20 lines
369 B
Nim
20 lines
369 B
Nim
import NimQml
|
|
import contact
|
|
import macros
|
|
|
|
proc mainProc() =
|
|
var app = newQApplication()
|
|
defer: app.delete()
|
|
|
|
let id = qmlRegisterType("ContactModule", 1, 0, "Contact", proc(): Contact = newContact());
|
|
|
|
var engine = newQQmlApplicationEngine()
|
|
defer: engine.delete()
|
|
|
|
engine.load("main.qml")
|
|
app.exec()
|
|
|
|
when isMainModule:
|
|
mainProc()
|
|
GC_fullcollect()
|