0

How can I extend QClipboard to allow selection of all text in all open windows.

Please provide code.

Thanks

Jesper
  • 202,709
  • 46
  • 318
  • 350
N K
  • 121
  • 1
  • 2
  • 6
  • Welcome to Stackoverflow. Visiting all sections of the [FAQ](http://chat.stackoverflow.com/) is not a waste of time: you will earn a badge :-) but also improve your proficiency. – menjaraz Dec 22 '11 at 13:23

1 Answers1

1

See QClipboard it's very simple for just text

QClipboard *clipboard = QApplication::clipboard();
QString getCLipboardText = clipboard->text();
QString newClipboardText("blah blah");
clipboard->setText(newClipboardText);
Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
  • :Thanks for your reply. but i want to retrieve global selection of any text in any window – N K Dec 20 '11 at 17:37
  • clipboard->text() will retrieve text from the clipboard - from whichever app it was copied from. There is only one system-wide clipboard – Martin Beckett Dec 20 '11 at 17:39