Handle missing copy shortcut.

Task-number: 257868
	Reviewed-by: kh
This commit is contained in:
kh
2009-07-27 16:39:18 +02:00
parent b41d3a45ad
commit 43a12b8d63
2 changed files with 14 additions and 1 deletions

View File

@@ -309,6 +309,17 @@ void HelpViewer::home()
setSource(homepage);
}
// TODO: remove this once we support multiple keysequences per command
void HelpViewer::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Insert && e->modifiers() == Qt::CTRL) {
if (hasSelection())
copy();
}
QWebView::keyPressEvent(e);
}
void HelpViewer::wheelEvent(QWheelEvent *e)
{
if (e->modifiers() & Qt::ControlModifier) {

View File

@@ -105,7 +105,9 @@ Q_SIGNALS:
void sourceChanged(const QUrl &);
protected:
virtual void wheelEvent(QWheelEvent *);
void keyPressEvent(QKeyEvent *e);
void wheelEvent(QWheelEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mousePressEvent(QMouseEvent *event);