Host a submission form on an untrusted or shared host by using public-key encryption!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0KB

  1. package main
  2. import (
  3. "git.openprivacy.ca/openprivacy/lockbox/api"
  4. "git.openprivacy.ca/openprivacy/log"
  5. "github.com/therecipe/qt/core"
  6. "github.com/therecipe/qt/qml"
  7. "github.com/therecipe/qt/quickcontrols2"
  8. "github.com/therecipe/qt/widgets"
  9. "os"
  10. )
  11. func main() {
  12. log.SetLevel(log.LevelDebug)
  13. core.QCoreApplication_SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)
  14. app := widgets.NewQApplication(len(os.Args), os.Args)
  15. app.SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)
  16. quickcontrols2.QQuickStyle_SetStyle("Material")
  17. engine := qml.NewQQmlApplicationEngine(nil)
  18. lockapi := api.NewLockBoxAPI(nil)
  19. engine.RootContext().SetContextProperty("lockbox", lockapi)
  20. // load the embedded qml file
  21. // created by either qtrcc or qtdeploy
  22. engine.Load(core.NewQUrl3("qrc:/qml/main.qml", 0))
  23. // you can also load a local file like this instead:
  24. //engine.Load(core.QUrl_FromLocalFile("./qml/main.qml"))
  25. // start the main Qt event loop
  26. // and block until app.Exit() is called
  27. // or the window is closed by the user
  28. widgets.QApplication_Exec()
  29. }