How is plasma active handling copy/paste in QML?

Mark markg85 at gmail.com
Tue Dec 4 19:34:13 UTC 2012


On Tue, Dec 4, 2012 at 3:04 PM, Sebastian Kügler <sebas at kde.org> wrote:
> On Thursday, November 29, 2012 15:45:33 Mark wrote:
>> Thanks for the information. Could any of you tell me some more about
>> the Plasma::Service stuff? The tutorial [1] provides only a little bit
>> of information.
>> [1] http://techbase.kde.org/Development/Tutorials/Plasma/Services
>
> That could be useful if you use a dataengine.
>
>> Or would just wrapping QClipboard  (along with some cut/copy/paste
>> calls) in a QML component be enough?
>
> It depends a bit on your specific usecase. Can you tell more about that?
> --
> sebas

Hi Sebas,

Sure. My usecase is the same as file managers for cut/copy/paste. Take
dolphin as an example. I want to be able to paste any files that are
in my clipboard. Also i have some file/folder representations so i
obviously want to cut or copy those as well. So what i would need is
access to the clipboard content (paste) and putting content on the
clipboard (cut/copy). All from QML. If that's done through a
"QClipboard QML wrapper" made available in QML or through some other
way made available in QML is the question. I have my fair share of
knowledge about making C++ classes available in QML so i can take that
route, i don't quite know the the route for the services and there is
too little information available to start using it (the wiki link i
mentioned is all i could find).

Another requirement is drag/drop. If i drag files on my application it
should paste the clipboard content.

If you have more info to share about those services, please do :)

Cheers,
Mark


More information about the Plasma-devel mailing list