In Qt, some QObject have certain properties that can be โconnectedโ using signals and slots:
auto *someWidget = QPushButton(/* ... */); auto *otherRelatedWidget = QLabel( /* ... */ ); // windowTitle is a property for both QWidgets QObject::connect(someWidget, &QWidget::windowTitleChanged, otherRelatedWidget, &QWidget::setWindowTitle);
In addition, you can connect other signals and slots, even if they are not related to properties.
I must point out that there is no syntactic sugar for this. See the documentation for more information.
source share