42 QObject *
obj = receiver;
44 if (
obj->inherits(
"MantidQt::API::MantidDialog")) {
45 qobject_cast<MantidDialog *>(
obj)->handleException(e);
57 QMessageBox::critical(qobject_cast<QWidget *>(parent()),
"Mantid - Error",
58 "Exception is caught in dialog:\n\n" + QString::fromStdString(e.what()));
double obj
the value of the quadratic function
PythonRunner m_pyRunner
This object implements the runPythonCode() function, by emitting the code as a runAsPythonScript sign...
MantidDialog(QWidget *parent=nullptr, const Qt::WindowFlags &flags=Qt::WindowCloseButtonHint|Qt::WindowType::WindowTitleHint)
DefaultConstructor.
void runAsPythonScript(const QString &code, bool)
~MantidDialog() override
Destructor.
static bool handle(QObject *receiver, const std::exception &e)
Handles the exception caught in an event handler.
virtual void handleException(const std::exception &e)
Override this method to handle an exception in a derived class.
QString runPythonCode(const QString &code, bool no_output=false)
Run python code that is passed to it and, optionally, return anything it wrote to standard output as ...
QString runPythonCode(const QString &code, bool no_output=false)
Run python code.