Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Slots | Public Member Functions
qSlicerWebPythonProxy Class Reference

#include <Base/QTGUI/qSlicerWebPythonProxy.h>

Inheritance diagram for qSlicerWebPythonProxy:
Inheritance graph
Collaboration diagram for qSlicerWebPythonProxy:
Collaboration graph

Public Slots

QString evalPython (const QString &python)

Public Member Functions

 qSlicerWebPythonProxy (QObject *parent=nullptr)
 Constructor. More...

Detailed Description

Definition at line 31 of file qSlicerWebPythonProxy.h.

Constructor & Destructor Documentation

◆ qSlicerWebPythonProxy()

qSlicerWebPythonProxy::qSlicerWebPythonProxy ( QObject *  parent = nullptr)


Member Function Documentation

◆ evalPython

QString qSlicerWebPythonProxy::evalPython ( const QString &  python)

Convenient function to execute python code from the JavaScript (when an instance of this class is registered with the WebChannel).

Internally Slicer's python manager is used to execute the passed code, and the resulting QVariant is returned as a string.

As a precaution, the user is prompted to allow or disallow running python code from web pages.

See also

The documentation for this class was generated from the following file: