How is plasma active handling copy/paste in QML?

Aaron J. Seigo aseigo at kde.org
Thu Nov 29 14:25:31 UTC 2012


On Thursday, November 29, 2012 15:07:51 Mark wrote:
> > So how does it work there?
> > Where is the QML component that can notify me of copy/cut/paste events?
..
> No replies and i can't find anything about cut/copy/paste actions in
> the plasma-mobile repository. Is there nothing for this?

it's done the same way as in the QWidget world -> capture the keyboard 
shortcut and use QClipboard .. i'm not aware of any QML clipboard bindings 
(perhaps they exist, i'm just not personally aware of any), but they can be 
accessed from C++.

as for file management, the Active Files application has a bit of C++ that 
provides access to KIO's copy and trash methods.

so either there needs to be some C++ in your project, or a QML plugin written 
in C++ the bridges to KIO needs to be written. a Plasma::Service would 
probably do the trick quite nicely as those can be loaded into QML ..

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121129/a4ed04a4/attachment.sig>


More information about the Plasma-devel mailing list