This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -145,42 +145,6 @@ In nodegui all these common QEvents are represented under an enum type: [WidgetE
145145
146146You can subscribe to a QEvent like so:
147147
148- ``` typescript
149- import React from " react" ;
150- import {
151- Renderer ,
152- Text ,
153- Window ,
154- useEventHandler
155- } from " @nodegui/react-nodegui" ;
156- import { QLabelSignals , QMouseEvent , WidgetEventTypes } from " @nodegui/nodegui" ;
157-
158- const App = () => {
159- const textHandler = useEventHandler <QLabelSignals >(
160- {
161- MouseMove : (nativeEvt : any ) => {
162- const mouseEvt = new QMouseEvent (nativeEvt );
163- console .log (" mouseMoved at: " , { x: mouseEvt .x (), y: mouseEvt .y () });
164- },
165- [WidgetEventTypes .MouseButtonPress ]: () => {
166- console .log (" mouse button was pressed" );
167- }
168- },
169- []
170- );
171-
172- return (
173- <Window >
174- < Text mouseTracking = {true } on = {textHandler }>
175- Move your mouse here
176- < / Text >
177- < / Window >
178- );
179- };
180-
181- Renderer .render (<App />);
182- ```
183-
184148``` html
185149<script lang =" ts" >
186150 import { onMount } from " svelte" ;
You can’t perform that action at this time.
0 commit comments