Remove partial event listener code.
This commit is contained in:
parent
82552a0fc8
commit
29cab9d42a
4
demo.ts
4
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);
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@ class QPushButtonWrap : public Napi::ObjectWrap<QPushButtonWrap> {
|
||||
static Napi::FunctionReference constructor;
|
||||
//wrapped methods
|
||||
Napi::Value setText(const Napi::CallbackInfo& info);
|
||||
Napi::Value setEventListener(const Napi::CallbackInfo& info);
|
||||
|
||||
QWIDGET_WRAPPED_METHODS_DECLARATION
|
||||
};
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
import { Component } from "../Component";
|
||||
|
||||
type Callback = () => void;
|
||||
|
||||
export abstract class EventComponent extends Component {
|
||||
abstract setEventListener(event: string, callback: Callback): void;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user