mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Support multi-line input in the python shell
This commit is contained in:
@@ -49,3 +49,17 @@ void RDLineEdit::keyPressEvent(QKeyEvent *e)
|
||||
QLineEdit::keyPressEvent(e);
|
||||
emit(keyPress(e));
|
||||
}
|
||||
|
||||
bool RDLineEdit::event(QEvent *e)
|
||||
{
|
||||
if(m_acceptTabs && e->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *ke = (QKeyEvent *)e;
|
||||
if(ke->key() == Qt::Key_Tab)
|
||||
{
|
||||
insert(lit("\t"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return QLineEdit::event(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user