mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
Merge branch 'master' into miqt-next
This commit is contained in:
commit
2f8b3eecc5
@ -30,6 +30,12 @@ The MIQT Go bindings are licensed under the MIT license.
|
|||||||
|
|
||||||
You must also meet your Qt license obligations.
|
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
|
## FAQ
|
||||||
|
|
||||||
### Q1. Why are the binaries so big?
|
### Q1. Why are the binaries so big?
|
||||||
@ -70,6 +76,8 @@ Most functions are implemented 1:1. [The Qt documentation](https://doc.qt.io/qt-
|
|||||||
|
|
||||||
The `QString`, `QList<T>`, and `QVector<T>` 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.
|
The `QString`, `QList<T>`, and `QVector<T>` 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 (<28>). 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.
|
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()...)`.
|
The `connect(sourceObject, sourceSignal, targetObject, targetSlot)` is projected as `targetObject.onSourceSignal(func()...)`.
|
||||||
|
Loading…
Reference in New Issue
Block a user