The QClipboard class provides access to the window system clipboard. More...
#include <qclipboard.h>
Inherits QObject.
The clipboard offers a simple mechanism to copy and paste data between applications.
QClipboard supports these formats (a format is identified by a string):
The "PIXMAP" format is not implemented in this version of Qt.
Only a single QClipboard object may exist in an application. This is because QClipboard is a shared window system resource. It is not possible to create a QClipboard object the standard C++ way (the constructor and destructor are private member functions, but accessible to QApplication since it is a friend class). Call QApplication::clipboard() to access the clipboard.
Example:
QClipboard *cb = QApplication::clipboard(); const char *text; // Copy text from the clipboard (paste) text = cb->text(); if ( text ) debug( "The clipboard contains: %s", text ); // Copy text into the clipboard cb->setText( "This text can be pasted by other programs" );
Clears the clipboard contents.
[virtual protected]
For internal use only.
Reimplemented from QObject.
Returns a pointer to the clipboard data, where format is the clipboard format.
We recommend that you use text() or pixmap() instead.
[signal]
This signal is emitted when the clipboard data is changed.
[virtual protected]
Handles clipboard events (very platform-specific).
Reimplemented from QObject.
Returns the clipboard pixmap, or null if the clipboard does not contains any pixmap.
See also: setText().
Copies text into the clipboard, where format is the clipboard format string and data is the data to be copied.
We recommend that you use setText() or setPixmap() instead.
Copies pixmap into the clipboard.
See also: pixmap().
Copies text into the clipboard.
See also: text().
Returns the clipboard text, or null if the clipboard does not contains any text.
See also: setText().
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright İ 1998 Troll Tech | Trademarks | Qt version 1.42
|