Provides several convenience closure taking methods to rust-qt.
Even though Qt's signal and slot mechanism is quite powerful and allows for very dynamic code and programming model, it's not always needed, especially for simple functionality or simple debugging.
In both C++ and Rust, defining signals and slots can become verbose at times, and even Qt itself supports closures on the C++ side.
For example, compare the following 2 programs for readability and writing ergonomics. Both programs do the same thing, the first doesn't use closures, it defines slots for the required signals. The second program, uses this crate, and uses closures without having to define slots in a separate object, nor does it require the derive SlotNoArgs/SlotOfBool/SlotOfQString boilerplate.
The first program (no closures): ```rust // no closures use cppcore::{Ptr, Ref, StaticUpcast}; use qtcore::{qs, slot, QBox, QObject, QString, SlotNoArgs, SlotOfBool, SlotOfQString}; use qt_widgets::{ QApplication, QCheckBox, QHBoxLayout, QLineEdit, QPushButton, QVBoxLayout, QWidget, }; use std::rc::Rc;
struct Form {
win: QBox
impl StaticUpcast
impl Form { fn new() -> Rc