June 2018
Intermediate to advanced
348 pages
8h 45m
English
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 ...