Bug 445878

Summary: Support generating and emitting custom signals
Product: [Unmaintained] rust-qt-binding-generator Reporter: Mikhail Zolotukhin <mail>
Component: generalAssignee: Jos van den Oever <jos>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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/