[Python] How do I send a callback every time the clipboard changes? #9679
Unanswered
isoraqathedh
asked this question in
Q&A
Replies: 1 comment
-
|
Hmm, I admit I don't now what APIs to use for watching for the clipboard, and indeed we don't have that for Slint itself. But I might be able to help with this:
In the upcoming release, we're adding support for asyncio: https://snapshots.slint.dev/master/docs/python/slint.html#asynchronous-io This will include You could try this out with our Nightly: https://github.com/slint-ui/slint/releases/tag/nightly |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
From my last question, I am currently porting a program that originally uses Tk to instead use Slint.
A problem I have encountered is that I can't send a custom event in Slint. Tk can accept and fire custom events (conceptually they are strings with something attached to them which I don't use) so you can call, e.g.
Tk.root.bindto have a function be called and then run on some other thread.In Slint, trying to call a method from the app object panics, as it cannot be sent across threads. The best I can think of is to make a component like:
but I have no idea how to implement such a thing. Previously I have just waited on an external process called
clipnotify.Beta Was this translation helpful? Give feedback.
All reactions