mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
fix the last fix for the tab stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6722 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
988355b92f
commit
98da3d5b1d
@ -28,6 +28,7 @@
|
||||
#include "LString.h"
|
||||
|
||||
using std::vector;
|
||||
using std::endl;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -41,12 +41,16 @@ void QCommandEdit::keyPressEvent(QKeyEvent * e)
|
||||
}
|
||||
|
||||
|
||||
void QCommandEdit::focusOutEvent(QFocusEvent * e)
|
||||
bool QCommandEdit::event(QEvent * e)
|
||||
{
|
||||
if (e->reason() == QFocusEvent::Tab) {
|
||||
emit tabPressed();
|
||||
return;
|
||||
}
|
||||
if (e->type() != QEvent::KeyPress)
|
||||
return QLineEdit::event(e);
|
||||
|
||||
QLineEdit::focusOutEvent(e);
|
||||
QKeyEvent * ev = (QKeyEvent *)e;
|
||||
|
||||
if (ev->key() != Key_Tab)
|
||||
return QLineEdit::event(e);
|
||||
|
||||
emit tabPressed();
|
||||
return true;
|
||||
}
|
||||
|
@ -32,9 +32,9 @@ signals:
|
||||
void tabPressed();
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent * e);
|
||||
virtual bool event(QEvent * e);
|
||||
|
||||
virtual void focusOutEvent(QFocusEvent * e);
|
||||
virtual void keyPressEvent(QKeyEvent * e);
|
||||
};
|
||||
|
||||
#endif // QCOMMANDEDIT_H
|
||||
|
Loading…
Reference in New Issue
Block a user