Skip to Main Content
C++ Reactive Programming
book

C++ Reactive Programming

by Praseed Pai, Peter Abraham
June 2018
Intermediate to advanced content levelIntermediate to advanced
348 pages
8h 45m
English
Packt Publishing
Content preview from C++ Reactive Programming

Creating the application dialog

As the label class has been implemented, we need to implement the dialog class to place all of the widgets and handle all of the signals emitted from the my_QLabel object. Let's start with the dialog.h header file:

#include <QDialog> 
 
class my_QLabel; 
class QLabel; 
 
class Dialog : public QDialog 
{ 
    Q_OBJECT 
public: 
    explicit Dialog(QWidget *parent = 0); 
    ~Dialog(); 
 
private slots: 
    void Mouse_CurrentPosition(); 
    void Mouse_Pressed(); 
    void Mouse_Left(); 
 
private: 
    void initializeWidgets(); 
    my_QLabel *label_MouseArea; 
    QLabel *label_Mouse_CurPos; 
    QLabel *label_MouseEvents; 
}; 

Here, we are creating a Dialog class inherited from QDialog, defined under the <QDialog> library. The classes QLabel and my_QLabel are forward declared ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Boost.Asio C++ Network Programming Cookbook

Boost.Asio C++ Network Programming Cookbook

Dmytro Radchuk

Publisher Resources

ISBN: 9781788629775Supplemental Content