Bug 445878 - Support generating and emitting custom signals
Summary: Support generating and emitting custom signals
Status: RESOLVED UNMAINTAINED
Alias: None
Product: rust-qt-binding-generator
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jos van den Oever
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-21 21:12 UTC by Mikhail Zolotukhin
Modified: 2024-09-22 20:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Zolotukhin 2021-11-21 21:12:14 UTC
SUMMARY

Currently, you can only add Q_INVOKABLE functions and Q_PROPERTIES to your objects in the bindigs.json. It is not possible to create custom signals, so that you can emit them from Rust code, and attach to them in the QML.
Comment 1 Jos van den Oever 2021-11-22 14:04:46 UTC
You can currently emit signals by modifying properties. So the machinery for emitting signals is there. If I understand correctly, you would like to have a way to specify signals in the bindings json file that generates rust functions for emitting other signals.

When signals are tied to properties, it's convenient in QML to tie the state to something in the UI. For signals that are not tied to any property, the update would only have temporary information. To use that information later, you'd then need to store that information in a QML property.

Can you explain your use-case?
Comment 2 Christoph Cullmann 2024-09-22 20:07:54 UTC
rust-qt-binding-generator is no longer maintained, please try more recent alternatives like

https://github.com/KDAB/cxx-qt/