icesimon's Blog

  • About Me
  • Archive
  • feeds

Posts match “ Clipboard ” tag:

about 7 years ago

Clipboard usage in Cascades

In C++, need to import LIBS += -lbbsystem

QString text;
bb::system::Clipboard clipboard;
clipboard.clear();
QByteArray byte;
byte = text.toLocal8Bit();
clipboard.insert(“text/plain”,byte);

Remember, the Clipboard need insert QByteArray type.
We can define the String as QByteArray in order to use the Clipboard.
If you need to use some special characters, don't forget to use this line

byte = text.toLocal8Bit();

Here is the official API reference :)
http://developer.blackberry.com/cascades/reference/bb__system__clipboard.html

  • BlackBerry
  • BB10
  • Cascades
  • Clipboard
  • Tips
  • February 01, 2016 13:55
  • Permalink
  • Comments
 

Copyright © 2013 icesimon . Powered by Logdown.
Based on work at subtlepatterns.com.