mirror of https://github.com/status-im/nimqml.git
feat: add clipboard support
This commit is contained in:
parent
1dc6acc87f
commit
f037d58687
|
@ -131,6 +131,7 @@ proc dos_qapplication_exec() {.cdecl, dynlib: dynLibName, importc.}
|
|||
proc dos_qapplication_quit() {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_icon(filename: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_delete() {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_clipboard_setText(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
|
||||
# QGuiApplication
|
||||
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}
|
||||
|
|
|
@ -14,6 +14,9 @@ proc quit*(application: QApplication) =
|
|||
proc icon*(application: QApplication, filename: string) =
|
||||
dos_qapplication_icon(filename.cstring)
|
||||
|
||||
proc setClipboardText*(text: string = "") =
|
||||
dos_qapplication_clipboard_setText(text.cstring)
|
||||
|
||||
proc delete*(application: QApplication) =
|
||||
## Delete the given QApplication
|
||||
if application.deleted:
|
||||
|
|
Loading…
Reference in New Issue