Fixed QPaint error

This commit is contained in:
master-atul 2019-08-20 16:56:00 +02:00
parent b11f32aa4c
commit 1af5d8bf68
12 changed files with 14 additions and 14 deletions

View File

@ -104,7 +104,7 @@ Also make sure to connect all the signals of the widgets to the event emitter in
class NPushButton: public QPushButton, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QPushButton)
public:
using QPushButton::QPushButton; //inherit all constructors of QPushButton

View File

@ -5,7 +5,7 @@
class NCheckBox: public QCheckBox, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QCheckBox)
public:
using QCheckBox::QCheckBox; //inherit all constructors of QCheckBox
};

View File

@ -5,7 +5,7 @@
class NLabel: public QLabel, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QLabel)
public:
using QLabel::QLabel; //inherit all constructors of QLabel
};

View File

@ -5,7 +5,7 @@
class NLineEdit: public QLineEdit, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QLineEdit)
public:
using QLineEdit::QLineEdit; //inherit all constructors of QLineEdit

View File

@ -6,7 +6,7 @@
class NMainWindow: public QMainWindow, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QMainWindow)
public:
using QMainWindow::QMainWindow; //inherit all constructors of QMainWindow
private:

View File

@ -6,7 +6,7 @@
class NPlainTextEdit : public QPlainTextEdit, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QPlainTextEdit)
public:
using QPlainTextEdit::QPlainTextEdit; //inherit all constructors of QPlainTextEdit

View File

@ -5,7 +5,7 @@
class NProgressBar: public QProgressBar, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QProgressBar)
public:
using QProgressBar::QProgressBar; //inherit all constructors of QProgressBar
};

View File

@ -6,7 +6,7 @@
class NPushButton: public QPushButton, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QPushButton)
public:
using QPushButton::QPushButton; //inherit all constructors of QPushButton

View File

@ -5,7 +5,7 @@
class NRadioButton: public QRadioButton, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QRadioButton)
public:
using QRadioButton::QRadioButton; //inherit all constructors of QRadioButton
};

View File

@ -7,7 +7,7 @@
class NWidget: public QWidget, public NodeWidget
{
NODEWIDGET_IMPLEMENTATIONS
NODEWIDGET_IMPLEMENTATIONS(QWidget)
public:
using QWidget::QWidget;
// https://doc.qt.io/qt-5/stylesheet-reference.html

View File

@ -46,10 +46,10 @@ Napi::Value unSubscribeToQtEvent(const Napi::CallbackInfo& info){ \
#ifndef EVENTWIDGET_IMPLEMENTATIONS
#define EVENTWIDGET_IMPLEMENTATIONS \
#define EVENTWIDGET_IMPLEMENTATIONS(BaseWidgetName) \
bool event(QEvent* event) { \
EventWidget::event(event); \
return QWidget::event(event); \
return BaseWidgetName::event(event); \
} \
#endif //EVENTWIDGET_IMPLEMENTATIONS

View File

@ -10,12 +10,12 @@ class NodeWidget : public YogaWidget, public EventWidget {
#ifndef NODEWIDGET_IMPLEMENTATIONS
#define NODEWIDGET_IMPLEMENTATIONS \
#define NODEWIDGET_IMPLEMENTATIONS(BaseWidgetName) \
\
Q_OBJECT \
public: \
SET_YOGA_WIDGET_Q_PROPERTIES \
EVENTWIDGET_IMPLEMENTATIONS \
EVENTWIDGET_IMPLEMENTATIONS(BaseWidgetName) \
#endif //NODEWIDGET_IMPLEMENTATIONS