Add part 4 of colorpalette example: Add and update a color
Add Color class marked with QML_SINGLETON to handle instantiation
of a QtOAIColor instance. (same as Credentials)
Note: The code is taken from "Qt Quick Demo - RESTful API client". It
only required minor changes to make it work.
In ColorView.qml:
- Add ColorsApi connections for adding and updating a color.
- Call ColorsAPi updateColor and addColor calls in ColorDialogEditor.
Task-number: QTBUG-140020
Change-Id: I4703f7e7d84c5bbf73d42d8357c136f537988ba8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
| commit | d121dd466952fcecaaeadb12db1597ea609a2e96 |
| parent | 42c9ee774acce5b9b4718b4aa541de391abd8b43 |
| author | Rym Bouabid <rym.bouabid@qt.io> |
| committer | Rym Bouabid <rym.bouabid@qt.io> |
| commit time | Fri, 5 Dec 2025 21:26:03 +0100 |
- M examples/openapi/colorpalette/ApiBridges.h
- M examples/openapi/colorpalette/CMakeLists.txt
- A examples/openapi/colorpalette/ColorPalette/ColorDialogEditor.qml
- M examples/openapi/colorpalette/ColorPalette/ColorView.qml
- M examples/openapi/colorpalette/icons/REUSE.toml
- A examples/openapi/colorpalette/icons/edit.svg
- A examples/openapi/colorpalette/icons/plus.svg
- M examples/openapi/colorpalette/icons/qt_attribution.json
- A examples/openapi/colorpalette/icons/update.svg