Slicer  5.0
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
[legend]
Collaboration diagram for qSlicerWebPythonProxy:
Collaboration graph
[legend]

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)
explicit

Constructor.

Member Function Documentation

◆ evalPython

QString qSlicerWebPythonProxy::evalPython ( const QString &  python)
slot

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
qSlicerWebWidget::initializeWebEngineProfile

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