Page Contents

This Page

WebView

class enaml.widgets.web_view.WebView(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A widget which displays a web page.

Unlike the simpler Html widget, this widget supports the features of a full web browser.

url = None

The URL to load in the web view. This can be a path to a remote resource or a path to a file on the local filesystem. This value is mutually exclusive of html.

html = None

The html to load into the web view. This value is mutually exclusive of url.

hug_width = None

A web view expands freely in height and width by default.

snapshot()[source]

Create the snapshot for the widget.

bind()[source]

Bind the change handlers for the widget.

Backends

Qt

digraph inheritance56536f3c85 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "QtControl" [style="setlinewidth(0.5)",URL="enaml.widgets.control.Control.html#enaml.qt.qt_control.QtControl",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtConstraintsWidget" -> "QtControl" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.qt.qt_constraints_widget.QtConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtConstraintsWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtWebView" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_web_view.QtWebView",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtControl" -> "QtWebView" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.qt.qt_widget.QtWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtObject" -> "QtWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.qt.qt_web_view.QtWebView(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt implementation of an Enaml WebView.

create_widget(parent, tree)[source]

Create the underlying QWebView control.

create(tree)[source]

Create and initialize the underlying control.

on_action_set_url(content)[source]

Handle the ‘set_url’ action from the Enaml widget.

on_action_set_html(content)[source]

Handle the ‘set_html’ action from the Enaml widget.

set_url(url)[source]

Set the url for the underlying control.

set_html(html)[source]

Set the html source for the underlying control.

Wx