examples/uidesigner: add README and screenshots

This commit is contained in:
mappu 2024-09-28 14:47:41 +12:00
parent 16435f1565
commit 6ebe54adbd
3 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# miqt/examples/uidesigner
This example shows how to use [Qt Designer](https://doc.qt.io/qt-5/qtdesigner-manual.html) and miqt-uic to design a UI.
## 1. Design
Use Qt Designer to build the UI and save as a `.ui` XML file.
![](uidesigner.png)
## 2. Compile
Compile the `.ui` XML to Go code with the `miqt-uic` tool.
```bash
miqt-uic -InFile design.ui -OutFile design.go
```
Some advanced configuration for `miqt-uic` can be done with other command-line arguments. Run `miqt-uic -Help` for more information.
## 3. Use
Use the generated types.
![](uidesigner.miqt.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB