Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
return {
ui: button,
value,
type
};
};
// Main Window
const win = new QMainWindow();
win.setFixedSize(230, 300);
// Root view
const rootView = new QWidget();
win.addEventListener(
BaseWidgetEvents.KeyRelease,
(nativeEvent: NativeElement) => {
const keyEvt = new QKeyEvent(nativeEvent);
const text = keyEvt.text();
const isNotNumber = isNaN(parseInt(text));
onBtnClick(text, isNotNumber ? "command" : "value");
}
);
rootView.setObjectName("rootView"); //This is like ids in web world
win.setCentralWidget(rootView);
const rootStyleSheet = `
* {
font-size: 20px;
color: white;
}
QPushButton {