diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-23 17:39:50 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-23 17:08:00 +0000 |
commit | 28f76593fa6177a3a97fd308f0404529a7337169 (patch) | |
tree | 18228f879dadb603c0c1d7a872dc3dc57939e911 /examples/widgetbinding | |
parent | 346daaa093a3939de17ffcb5d6a2761c5fc2e0f2 (diff) |
Update and unify README.md of our binding examples
ninja is the only working generator for Qt 6.
Pick-to: 6.0
Change-Id: I9640f646ffea7b21659966680df52a21ead7119d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/widgetbinding')
-rw-r--r-- | examples/widgetbinding/README.md | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/examples/widgetbinding/README.md b/examples/widgetbinding/README.md index cf68fe98f..5fee93c8c 100644 --- a/examples/widgetbinding/README.md +++ b/examples/widgetbinding/README.md @@ -1,7 +1,7 @@ # WigglyWidget The original Qt/C++ example can be found here: -https://doc.qt.io/qt-5/qtwidgets-widgets-wiggly-example.html +https://doc.qt.io/qt-6/qtwidgets-widgets-wiggly-example.html This example shows how to interact with a custom widget from two different ways: @@ -39,34 +39,36 @@ The most important files are: * `pyside_config.py` which is located in the utils directory, one level up, to get the path for Shiboken and PySide. -Now create a `build/` directory, and from inside run `cmake ..` to use -the provided `CMakeLists.txt`. -To build, just run `make`, and `make install` to copy the generated files -to the main example directory to be able to run the final example: -`python main.py`. -You should be able to see two identical custom widgets, one being the -Python translation, and the other one being the C++ one. - -### Windows - -For windows it's recommended to use either `nmake`, `jom` or `ninja`, -when running cmake. +Now create a `build/` directory, and from inside run `cmake` to use +the provided `CMakeLists.txt`: +macOS/Linux: ```bash -cmake -H.. -B. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release # for nmake -cmake -H.. -B. -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release # for jom -cmake -H.. -B. -G Ninja -DCMAKE_BUILD_TYPE=Release # for ninja +cd ~/pyside-setup/examples/widgetbinding ``` -### Linux, macOS - -Generally using `make` will be enough, but as in the Windows case, you can use -ninja to build the project. +On Windows: +```bash +cd C:\pyside-setup\examples\widgetbinding +``` ```bash +mkdir build +cd build cmake -H.. -B. -G Ninja -DCMAKE_BUILD_TYPE=Release +ninja +ninja install +cd .. ``` +The final example can then be run by: +```bash +python main.py +``` + +You should see two identical custom widgets, one being the +Python translation, and the other one being the C++ one. + ## Final words Since this example originated by mixing the concepts of the `scriptableapplication` |