From 4b50e543d695f71e10ad8c2f55a7716ba2a1db0d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 4 Mar 2009 14:30:42 +0000 Subject: [PATCH] focus the text when showing an annotation popup svn path=/trunk/KDE/kdegraphics/okular/; revision=935096 --- ui/annotwindow.cpp | 8 ++++++++ ui/annotwindow.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp index 52941d4ff..dfea705b0 100644 --- a/ui/annotwindow.cpp +++ b/ui/annotwindow.cpp @@ -204,6 +204,14 @@ void AnnotWindow::reloadInfo() m_title->setDate( m_annot->modificationDate() ); } +void AnnotWindow::showEvent( QShowEvent * event ) +{ + QFrame::showEvent( event ); + + // focus the content area by default + textEdit->setFocus(); +} + void AnnotWindow::slotOptionBtn() { //TODO: call context menu in pageview diff --git a/ui/annotwindow.h b/ui/annotwindow.h index 8e3a74d3b..edcc54d87 100644 --- a/ui/annotwindow.h +++ b/ui/annotwindow.h @@ -36,6 +36,9 @@ class AnnotWindow : public QFrame public: Okular::Annotation* m_annot; + protected: + virtual void showEvent( QShowEvent * event ); + private slots: void slotOptionBtn(); void slotsaveWindowText();