diff --git a/src/scripting/python/pythonconsole.cpp b/src/scripting/python/pythonconsole.cpp index 8864493aa..2782fe6c3 100644 --- a/src/scripting/python/pythonconsole.cpp +++ b/src/scripting/python/pythonconsole.cpp @@ -35,6 +35,7 @@ PythonConsole::PythonConsole(QWidget *parent) { ui_->setupUi(this); connect(ui_->modules, SIGNAL(currentIndexChanged(int)), SLOT(ModuleChanged(int))); + connect(ui_->clearConsoleButton, SIGNAL(clicked()),SLOT(ClearConsole())); } PythonConsole::~PythonConsole() { @@ -67,3 +68,7 @@ void PythonConsole::ModuleChanged(int row) { layout()->addWidget(widget_); } + +void PythonConsole::ClearConsole() { + widget_->clear(); +} diff --git a/src/scripting/python/pythonconsole.h b/src/scripting/python/pythonconsole.h index adca56dd7..db9c4cec6 100644 --- a/src/scripting/python/pythonconsole.h +++ b/src/scripting/python/pythonconsole.h @@ -42,6 +42,7 @@ protected: private slots: void ModuleChanged(int row); + void ClearConsole(); private: Ui_PythonConsole* ui_; diff --git a/src/scripting/python/pythonconsole.ui b/src/scripting/python/pythonconsole.ui index b8e02cffc..f6eb5aece 100644 --- a/src/scripting/python/pythonconsole.ui +++ b/src/scripting/python/pythonconsole.ui @@ -33,6 +33,13 @@ + + + + Clear Console + + +