doc: improvements for rendering in Github web interface

This commit is contained in:
mappu 2024-08-25 16:33:08 +12:00
parent 1bd1b2b6fe
commit f94c0ecca5
2 changed files with 12 additions and 9 deletions

View File

@ -4,7 +4,7 @@
# MIQT
MIT-licensed Qt bindings for Go.
MIQT is MIT-licensed Qt bindings for Go.
This is a straightforward binding of the Qt API using CGO. You must have a working Qt C++ development toolchain to use this Go binding.
@ -22,33 +22,34 @@ These bindings were newly started in August 2024. The bindings are functional fo
## License
- The Go bindings and tools in this repo are licensed under the MIT license
- You must also meet your Qt license obligations.
The MIQT Go bindings are licensed under the MIT license.
You must also meet your Qt license obligations.
## FAQ
1. Why are the binaries so big?
### Q1. Why are the binaries so big?
Make sure to compile with `go build "-ldflags -s -w"`. This reduces the `helloworld` example from 43MB to 6MB.
Then, it's possible to reduce the size further with `upx --best` to 2MB or `upx --lzma` to 1.4MB.
2. Can I release a proprietary, commercial app with this binding?
### Q2. Can I release a proprietary, commercial app with this binding?
Yes. You must also meet your Qt license obligations: either use Qt dynamically-linked dll/so/dylib files under the LGPL, or, purchase a Qt commercial license for static linking.
3. Why does it take so long to compile?
### Q3. Why does it take so long to compile?
The first time the Qt bindings are compiled takes a long time. After this, it's fast. In a Dockerfile, you could cache the build step by running `go install github.com/mappu/miqt`.
4. How does this compare to other Qt bindings?
### Q4. How does this compare to other Qt bindings?
MIQT is a clean-room binding that does not use any code from other Qt bindings.
- [therecipe/qt](https://github.com/therecipe/qt) is the most mature Qt binding for Go. But because of the LGPL license, it's [extremely difficult to make a proprietary app](https://github.com/therecipe/qt/wiki/FAQ#can-i-make-a-proprietary-app-with-this-binding-). See also their [issue 259](https://github.com/therecipe/qt/issues/259).
- [kitech/qt.go](https://github.com/kitech/qt.go) is another mature Qt binding for Go. Unfortunately, it's also using the LGPL license.
5. How does the MIQT Go API differ from the official Qt C++ API?
### Q5. How does the MIQT Go API differ from the official Qt C++ API?
Most functions are implemented 1:1. The Qt documentation should be used.
@ -56,4 +57,6 @@ The `QString` and `QList<T>` types are projected as plain Go `string` and `[]T`.
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()...)`.
Some C++ idioms that were difficult to project were omitted from the binding. But, this can be improved in the future.

View File

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg version="1.1" viewBox="0 0 130 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-31.764 -118.17)"><path d="m141.93 181.78 19.427-19.427v-44.189h-106.8l-22.791 22.791v41.209z" fill="#729fcf"/><g fill="#fff" stroke-width=".47187" aria-label="miQt"><path d="m56.339 163.56h-3.3974v-22.65h3.3521v1.5855q3.3974-2.0385 6.6137-2.0385 4.2128 0 5.8889 2.3102 1.4949-0.90598 3.8504-1.5855 2.4009-0.72478 4.2128-0.72478 4.5299 0 6.0701 2.4462 1.5855 2.4008 1.5855 8.6974v11.959h-3.3974v-11.868q0-4.7111-0.90598-6.4325-0.90598-1.7667-3.8504-1.7667-1.4949 0-3.0803 0.45299-1.5855 0.40769-2.4462 0.81538l-0.86068 0.4077q0.58889 1.4949 0.58889 6.6137v11.778h-3.3974v-11.687q0-4.8923-0.90598-6.6137-0.86068-1.7667-3.8504-1.7667-1.4496 0-2.9897 0.45299-1.4949 0.40769-2.3103 0.81538l-0.77008 0.4077z"/><path d="m90.812 163.56v-22.65h3.3974v22.65zm0-27.768v-3.941h3.3974v3.941z"/><path d="m112.42 164.01q-7.0214 0-9.694-3.8504-2.6726-3.8504-2.6726-12.095 0-8.2897 2.718-12.276 2.7179-4.0316 9.6487-4.0316 6.9308 0 9.6487 3.9863 2.7632 3.9863 2.7632 12.276 0 5.753-1.1778 9.241-1.1778 3.4427-4.0316 5.1188l3.8504 6.206-3.2615 1.5402-3.9863-6.5231q-1.4949 0.40769-3.8051 0.40769zm-8.788-15.991q0 6.8855 1.812 9.9205 1.812 2.9897 6.9761 2.9897 5.2094 0 6.9761-2.8991 1.812-2.9444 1.812-9.8752 0-6.9761-1.8573-10.147-1.8573-3.1709-6.9761-3.1709-5.0735 0-6.9308 3.1709-1.812 3.1256-1.812 10.011z"/><path d="m142.36 143.85h-7.2026v10.826q0 3.8957 0.54359 5.1188 0.58889 1.2231 2.7179 1.2231l4.0316-0.27179 0.2265 2.8085q-3.035 0.49829-4.6205 0.49829-3.5333 0-4.8923-1.7214-1.359-1.7214-1.359-6.5684v-11.914h-3.2162v-2.9444h3.2162v-6.9308h3.3521v6.9308h7.2026z"/></g></g></svg>
<svg version="1.1" viewBox="0 0 130 64" width="130px" height="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-31.764 -118.17)"><path d="m141.93 181.78 19.427-19.427v-44.189h-106.8l-22.791 22.791v41.209z" fill="#729fcf"/><g fill="#fff" stroke-width=".47187" aria-label="miQt"><path d="m56.339 163.56h-3.3974v-22.65h3.3521v1.5855q3.3974-2.0385 6.6137-2.0385 4.2128 0 5.8889 2.3102 1.4949-0.90598 3.8504-1.5855 2.4009-0.72478 4.2128-0.72478 4.5299 0 6.0701 2.4462 1.5855 2.4008 1.5855 8.6974v11.959h-3.3974v-11.868q0-4.7111-0.90598-6.4325-0.90598-1.7667-3.8504-1.7667-1.4949 0-3.0803 0.45299-1.5855 0.40769-2.4462 0.81538l-0.86068 0.4077q0.58889 1.4949 0.58889 6.6137v11.778h-3.3974v-11.687q0-4.8923-0.90598-6.6137-0.86068-1.7667-3.8504-1.7667-1.4496 0-2.9897 0.45299-1.4949 0.40769-2.3103 0.81538l-0.77008 0.4077z"/><path d="m90.812 163.56v-22.65h3.3974v22.65zm0-27.768v-3.941h3.3974v3.941z"/><path d="m112.42 164.01q-7.0214 0-9.694-3.8504-2.6726-3.8504-2.6726-12.095 0-8.2897 2.718-12.276 2.7179-4.0316 9.6487-4.0316 6.9308 0 9.6487 3.9863 2.7632 3.9863 2.7632 12.276 0 5.753-1.1778 9.241-1.1778 3.4427-4.0316 5.1188l3.8504 6.206-3.2615 1.5402-3.9863-6.5231q-1.4949 0.40769-3.8051 0.40769zm-8.788-15.991q0 6.8855 1.812 9.9205 1.812 2.9897 6.9761 2.9897 5.2094 0 6.9761-2.8991 1.812-2.9444 1.812-9.8752 0-6.9761-1.8573-10.147-1.8573-3.1709-6.9761-3.1709-5.0735 0-6.9308 3.1709-1.812 3.1256-1.812 10.011z"/><path d="m142.36 143.85h-7.2026v10.826q0 3.8957 0.54359 5.1188 0.58889 1.2231 2.7179 1.2231l4.0316-0.27179 0.2265 2.8085q-3.035 0.49829-4.6205 0.49829-3.5333 0-4.8923-1.7214-1.359-1.7214-1.359-6.5684v-11.914h-3.2162v-2.9444h3.2162v-6.9308h3.3521v6.9308h7.2026z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB