From de1951684d4441584144f23802987dfaf8858eeb Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 5 Oct 2024 17:52:30 +1300 Subject: [PATCH 1/2] doc/README: add note re QString UTF8/UTF16 conversion --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a803f4..b8f98a8 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ Most functions are implemented 1:1. [The Qt documentation](https://doc.qt.io/qt- The `QString`, `QList`, and `QVector` types are projected as plain Go `string` and `[]T`. Therefore, you can't call any of QString/QList/QVector's helper methods, you must use some Go equivalent method instead. +- Go strings are internally converted to QString using `QString::fromUtf8`. Therefore, the Go string must be UTF-8 to avoid [mojibake](https://en.wikipedia.org/wiki/Mojibake). If the Go string contains binary data, the conversion would corrupt such bytes into U+FFFD (�). On return to Go space, this becomes `\xEF\xBF\xBD`. + Where Qt returns a C++ object by value (e.g. `QSize`), the binding may have moved it to the heap, and in Go this may be represented as a pointer type. In such cases, a Go finalizer is added to automatically delete the heap object. This means code using MIQT can look basically similar to the Qt C++ equivalent code. The `connect(sourceObject, sourceSignal, targetObject, targetSlot)` is projected as `targetObject.onSourceSignal(func()...)`. From ab5dcce9e8713485c6e4d87bc385d066870dc980 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 5 Oct 2024 17:53:15 +1300 Subject: [PATCH 2/2] doc/README: add initial made-with-miqt section --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b8f98a8..0de810c 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ The MIQT Go bindings are licensed under the MIT license. You must also meet your Qt license obligations. +## Made with MIQT + +- [mdoutliner](https://github.com/mappu/miqt/tree/master/examples/mdoutliner), Markdown Outliner sample application +- [qbolt](https://code.ivysaur.me/qbolt), a graphical database manager for BoltDB +- Raise an issue or PR to have your app listed here! + ## FAQ ### Q1. Why are the binaries so big?