Re: Help with screenshot API.
Vlad Zahorodnii <[email protected]> Fri, 4 Oct 2024 17:49:58 +0300
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
On 10/4/24 5:28 PM, rahul vadhyar wrote: > Even if CaptureWorkspace returns a dictionary, I shouldn't be getting > the error that the API doesn't exist. I think that the error message is rather misleading. CaptureWorkspace expects some input arguments, but the example code provides none so QtDBus says that there's no CaptureWorkspace **with the specified** signature. CaptureWorkspace expects two arguments: a dictionary with various options (it can be empty), and a pipe file descriptor where kwin will write screenshot to. A good example how to use that API is spectacle or xdg-desktop-portal-kde https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/30b9ac6a169ee9f7c36aabbec4038a8a715ac2cb/src/screenshotdialog.cpp#L158 > To provide more context, I am making a kirigami app. I am using the > .desktop file as given in the previous email. I am also using the > following command for compiling and testing