how to read and write clipboard in plasma qml?

Bruce Ouyang bruce.oy at gmail.com
Wed Jul 24 04:23:20 UTC 2013


thanks for your reply!
there is no singal handler named onCompleted in the document here:
http://qt-project.org/doc/qt-4.8/qml-textedit.html

where do you find it? where is the description?

On 2013年7月23日星期二 CST下午8时53分00秒, Sebastian Kügler wrote:
> Hi,
>
> On Friday, July 19, 2013 22:39:42 Bruce Ouyang wrote:
>> i have googled and found no solution. it seems i have to 
>> utilize LauchApp to
>> call a python script for accessing clipboard ps: xclip command is not my
>> solution because it may be absent in some KDE distributions.
>
> You can use a QML TextEdit as helper, this allows you to access 
> the clipboard.
>
> so if
>
> TextEdit {
>   visible: false
>   text: myStuff
>   onCompleted: { 
>     text = "This is going to be copied"
>     selectAll()
>     copy()
>   }
>   [...]
> }
>
> Same mechanism with paste(), just the other way round.
>
> Cheers,



More information about the Plasma-devel mailing list