O'Reilly logo

C++ Reactive Programming by Peter Abraham, Praseed Pai

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An introduction to RxQt

The RxQt library is a public domain library written over the RxCpp library and makes it easy to program with Qt events and signals in a reactive manner. To understand the library, let us jump into an example so that we can track the mouse events and filter them using the observable supplied by the library. The library can be downloaded from the GitHub repository at https://github.com/tetsurom/rxqt:

#include <QApplication> #include <QLabel> #include <QMouseEvent> #include "rxqt.hpp" int main(int argc, char *argv[]) { QApplication app(argc, argv); auto widget = new QWidget(); widget->resize(350,300); widget->setCursor(Qt::OpenHandCursor); auto xDock = new QLabel((QWidget*)widget); xDock->setStyleSheet("QLabel { background-color ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required