Copying from the docs

Andras Mantia amantia at virtualartisans.com
Wed Jun 18 10:11:03 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

  Due to a Quanta bug report I've noticed that Gideon has also some problems 
with copying from the documentation pages if the clipboard is set to 
"separate clipboard and selection". In this case you can copy from the docs 
to the editor pages only with the mouse (middle button click). Pasting works 
only if you explicetly select the text in Klipper. This is because during the 
copy action handling, the text selected in the KHTML part is not copied to 
the clipboard. The solution in Quanta was to attach a slot to the standard 
copy action, call the KTextEditor::ClipboardInterface::copy() there (this 
will handle the copy for the editor part) if the editor is visible and copy 
the selection content to the clipboard with

  QClipboard *cb = QApplication::clipboard();
  QString text = cb->text(QClipboard::Selection);
  cb->setText(text, QClipboard::Clipboard);


Andras

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+8GiRTQdfac6L/08RAhhHAJ42pZH9lL2ZHM7otsn1tDWdY8yMzwCfewQH
ehbh6mvO4LpBMkZzF1tqDZI=
=RA6d
-----END PGP SIGNATURE-----





More information about the KDevelop-devel mailing list