diff --git a/demo.ts b/demo.ts index a479279e3..ffc82f89f 100644 --- a/demo.ts +++ b/demo.ts @@ -19,10 +19,6 @@ label2.setStyleSheet("background-color:blue; color:white;"); const button1 = new QPushButton(); button1.setText("Yolo"); -// button1.setEventListener("click", () => { -// console.log("button clicked"); -// }); - gridLayout.addWidget(label); gridLayout.addWidget(label2); gridLayout.addWidget(button1); diff --git a/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.cpp b/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.cpp index 4e5a2cde8..e65b6f349 100644 --- a/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.cpp +++ b/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.cpp @@ -56,8 +56,3 @@ Napi::Value QPushButtonWrap::setText(const Napi::CallbackInfo& info) { return env.Null(); } -Napi::Value QPushButtonWrap::setEventListener(const Napi::CallbackInfo& info){ - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - return env.Null(); -} diff --git a/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.h b/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.h index f4c6513c0..d026eb1f8 100644 --- a/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.h +++ b/src/cpp/QtWidgets/QPushButton/qpushbutton_wrap.h @@ -16,7 +16,6 @@ class QPushButtonWrap : public Napi::ObjectWrap { static Napi::FunctionReference constructor; //wrapped methods Napi::Value setText(const Napi::CallbackInfo& info); - Napi::Value setEventListener(const Napi::CallbackInfo& info); QWIDGET_WRAPPED_METHODS_DECLARATION }; diff --git a/src/lib/core/EventComponent/index.ts b/src/lib/core/EventComponent/index.ts deleted file mode 100644 index f533d1984..000000000 --- a/src/lib/core/EventComponent/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from "../Component"; - -type Callback = () => void; - -export abstract class EventComponent extends Component { - abstract setEventListener(event: string, callback: Callback): void; -}