CopperSpice API  1.7.2
QGraphicsWebView Class Reference

The QGraphicsWebView class allows Web content to be added to a GraphicsView. More...

Inheritance diagram for QGraphicsWebView:
QGraphicsWidget QGraphicsObject QGraphicsLayoutItem QObject QGraphicsItem

Public Signals

void iconChanged ()
 
void linkClicked (const QUrl &un_named_arg1)
 
void loadFinished (bool un_named_arg1)
 
void loadProgress (int progress)
 
void loadStarted ()
 
void statusBarMessage (const QString &message)
 
void titleChanged (const QString &un_named_arg1)
 
void urlChanged (const QUrl &un_named_arg1)
 
- Public Signals inherited from QGraphicsWidget
void geometryChanged ()
 
- Public Signals inherited from QGraphicsObject
void enabledChanged ()
 
void opacityChanged ()
 
void parentChanged ()
 
void rotationChanged ()
 
void scaleChanged ()
 
void visibleChanged ()
 
void xChanged ()
 
void yChanged ()
 
void zChanged ()
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void back ()
 
void forward ()
 
void reload ()
 
void stop ()
 
- Public Slots inherited from QGraphicsWidget
bool close ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QGraphicsWebView (QGraphicsItem *parent=0)
 
 ~QGraphicsWebView ()
 
bool event (QEvent *) override
 
bool findText (const QString &subString, QWebPage::FindFlags options=0)
 
QWebHistoryhistory () const
 
QVariant inputMethodQuery (Qt::InputMethodQuery query) const override
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
void load (const QNetworkRequest &request, QNetworkAccessManager::Operation operation=QNetworkAccessManager::GetOperation, const QByteArray &body=QByteArray ())
 
void load (const QUrl &url)
 
QWebPagepage () const
 
QActionpageAction (QWebPage::WebAction action) const
 
void paint (QPainter *, const QStyleOptionGraphicsItem *options, QWidget *widget=0) override
 
void setContent (const QByteArray &data, const QString &mimeType=QString (), const QUrl &baseUrl=QUrl ())
 
void setGeometry (const QRectF &rect) override
 
void setHtml (const QString &html, const QUrl &baseUrl=QUrl ())
 
void setPage (QWebPage *)
 
void setRenderHint (QPainter::RenderHint, bool enabled=true)
 
QWebSettingssettings () const
 
QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint) const override
 
void triggerPageAction (QWebPage::WebAction action, bool checked=false)
 
void updateGeometry () override
 
- Public Methods inherited from QGraphicsWidget
 QGraphicsWidget (QGraphicsItem *parent=nullptr, Qt::WindowFlags flags=Qt::EmptyFlag)
 
 ~QGraphicsWidget ()
 
QList< QAction * > actions () const
 
void addAction (QAction *action)
 
void addActions (const QList< QAction * > &actions)
 
void adjustSize ()
 
bool autoFillBackground () const
 
QRectF boundingRect () const override
 
const QList< QObject * > & children () const
 
Qt::FocusPolicy focusPolicy () const
 
QGraphicsWidget * focusWidget () const
 
QFont font () const
 
void getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const override
 
void getWindowFrameMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const
 
int grabShortcut (const QKeySequence &sequence, Qt::ShortcutContext context=Qt::WindowShortcut)
 
void insertAction (QAction *before, QAction *action)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
bool isActiveWindow () const
 
QGraphicsLayoutlayout () const
 
Qt::LayoutDirection layoutDirection () const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
 
virtual void paintWindowFrame (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
 
QPalette palette () const
 
QRectF rect () const
 
void releaseShortcut (int id)
 
void removeAction (QAction *action)
 
void resize (const QSizeF &size)
 
void resize (qreal width, qreal height)
 
void setAttribute (Qt::WidgetAttribute attribute, bool on=true)
 
void setAutoFillBackground (bool enabled)
 
void setContentsMargins (qreal left, qreal top, qreal right, qreal bottom)
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
void setFont (const QFont &font)
 
void setGeometry (qreal x, qreal y, qreal width, qreal height)
 
void setLayout (QGraphicsLayout *layout)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
void setPalette (const QPalette &palette)
 
void setShortcutAutoRepeat (int id, bool enabled=true)
 
void setShortcutEnabled (int id, bool enabled=true)
 
void setStyle (QStyle *style)
 
void setWindowFlags (Qt::WindowFlags flags)
 
void setWindowFrameMargins (qreal left, qreal top, qreal right, qreal bottom)
 
void setWindowTitle (const QString &title)
 
QPainterPath shape () const override
 
QSizeF size () const
 
QStylestyle () const
 
bool testAttribute (Qt::WidgetAttribute attribute) const
 
int type () const override
 
void unsetLayoutDirection ()
 
void unsetWindowFrameMargins ()
 
Qt::WindowFlags windowFlags () const
 
QRectF windowFrameGeometry () const
 
QRectF windowFrameRect () const
 
QString windowTitle () const
 
Qt::WindowType windowType () const
 
- Public Methods inherited from QGraphicsObject
 QGraphicsObject (QGraphicsItem *parent=nullptr)
 
const QList< QObject * > & children () const
 
void grabGesture (Qt::GestureType gesture, Qt::GestureFlags flags=Qt::GestureFlags ())
 
void ungrabGesture (Qt::GestureType gesture)
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 
- Public Methods inherited from QGraphicsItem
 QGraphicsItem (QGraphicsItem *parent=nullptr)
 
virtual ~QGraphicsItem ()
 
bool acceptDrops () const
 
Qt::MouseButtons acceptedMouseButtons () const
 
bool acceptHoverEvents () const
 
bool acceptTouchEvents () const
 
virtual void advance (int phase)
 
virtual QRectF boundingRect () const = 0
 
QRegion boundingRegion (const QTransform &itemToDeviceTransform) const
 
qreal boundingRegionGranularity () const
 
CacheMode cacheMode () const
 
QList< QGraphicsItem * > childItems () const
 
QRectF childrenBoundingRect () const
 
void clearFocus ()
 
QPainterPath clipPath () const
 
virtual bool collidesWithItem (const QGraphicsItem *graphicsItem, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
virtual bool collidesWithPath (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
QList< QGraphicsItem * > collidingItems (Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
QGraphicsItem * commonAncestorItem (const QGraphicsItem *graphicsItem) const
 
virtual bool contains (const QPointF &point) const
 
QCursor cursor () const
 
QVariant data (int key) const
 
QTransform deviceTransform (const QTransform &viewportTransform) const
 
qreal effectiveOpacity () const
 
void ensureVisible (const QRectF &rectF=QRectF (), int xmargin=50, int ymargin=50)
 
void ensureVisible (qreal x, qreal y, qreal width, qreal height, int xmargin=50, int ymargin=50)
 
bool filtersChildEvents () const
 
GraphicsItemFlags flags () const
 
QGraphicsItem * focusItem () const
 
QGraphicsItem * focusProxy () const
 
void grabKeyboard ()
 
void grabMouse ()
 
QGraphicsEffectgraphicsEffect () const
 
QGraphicsItemGroupgroup () const
 
bool handlesChildEvents () const
 
bool hasCursor () const
 
bool hasFocus () const
 
void hide ()
 
Qt::InputMethodHints inputMethodHints () const
 
void installSceneEventFilter (QGraphicsItem *filterItem)
 
bool isActive () const
 
bool isAncestorOf (const QGraphicsItem *graphicsItem) const
 
bool isBlockedByModalPanel (QGraphicsItem **blockingPanel=nullptr) const
 
bool isClipped () const
 
bool isEnabled () const
 
bool isObscured (const QRectF &rectF=QRectF ()) const
 
bool isObscured (qreal x, qreal y, qreal width, qreal height) const
 
virtual bool isObscuredBy (const QGraphicsItem *graphicsItem) const
 
bool isPanel () const
 
bool isSelected () const
 
bool isUnderMouse () const
 
bool isVisible () const
 
bool isVisibleTo (const QGraphicsItem *graphicsItem) const
 
bool isWidget () const
 
bool isWindow () const
 
QTransform itemTransform (const QGraphicsItem *graphicsItem, bool *ok=nullptr) const
 
QPainterPath mapFromItem (const QGraphicsItem *graphicsItem, const QPainterPath &path) const
 
QPointF mapFromItem (const QGraphicsItem *graphicsItem, const QPointF &point) const
 
QPolygonF mapFromItem (const QGraphicsItem *graphicsItem, const QPolygonF &polygon) const
 
QPolygonF mapFromItem (const QGraphicsItem *graphicsItem, const QRectF &rectF) const
 
QPointF mapFromItem (const QGraphicsItem *graphicsItem, qreal x, qreal y) const
 
QPolygonF mapFromItem (const QGraphicsItem *graphicsItem, qreal x, qreal y, qreal width, qreal height) const
 
QPainterPath mapFromParent (const QPainterPath &path) const
 
QPointF mapFromParent (const QPointF &point) const
 
QPolygonF mapFromParent (const QPolygonF &polygon) const
 
QPolygonF mapFromParent (const QRectF &rectF) const
 
QPointF mapFromParent (qreal x, qreal y) const
 
QPolygonF mapFromParent (qreal x, qreal y, qreal width, qreal height) const
 
QPainterPath mapFromScene (const QPainterPath &path) const
 
QPointF mapFromScene (const QPointF &point) const
 
QPolygonF mapFromScene (const QPolygonF &polygon) const
 
QPolygonF mapFromScene (const QRectF &rectF) const
 
QPointF mapFromScene (qreal x, qreal y) const
 
QPolygonF mapFromScene (qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectFromItem (const QGraphicsItem *graphicsItem, const QRectF &rectF) const
 
QRectF mapRectFromItem (const QGraphicsItem *graphicsItem, qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectFromParent (const QRectF &rectF) const
 
QRectF mapRectFromParent (qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectFromScene (const QRectF &rectF) const
 
QRectF mapRectFromScene (qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectToItem (const QGraphicsItem *graphicsItem, const QRectF &rectF) const
 
QRectF mapRectToItem (const QGraphicsItem *graphicsItem, qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectToParent (const QRectF &rectF) const
 
QRectF mapRectToParent (qreal x, qreal y, qreal width, qreal height) const
 
QRectF mapRectToScene (const QRectF &rectF) const
 
QRectF mapRectToScene (qreal x, qreal y, qreal width, qreal height) const
 
QPainterPath mapToItem (const QGraphicsItem *graphicsItem, const QPainterPath &path) const
 
QPointF mapToItem (const QGraphicsItem *graphicsItem, const QPointF &point) const
 
QPolygonF mapToItem (const QGraphicsItem *graphicsItem, const QPolygonF &polygon) const
 
QPolygonF mapToItem (const QGraphicsItem *graphicsItem, const QRectF &rectF) const
 
QPointF mapToItem (const QGraphicsItem *graphicsItem, qreal x, qreal y) const
 
QPolygonF mapToItem (const QGraphicsItem *graphicsItem, qreal x, qreal y, qreal width, qreal height) const
 
QPainterPath mapToParent (const QPainterPath &path) const
 
QPointF mapToParent (const QPointF &point) const
 
QPolygonF mapToParent (const QPolygonF &polygon) const
 
QPolygonF mapToParent (const QRectF &rectF) const
 
QPointF mapToParent (qreal x, qreal y) const
 
QPolygonF mapToParent (qreal x, qreal y, qreal width, qreal height) const
 
QPainterPath mapToScene (const QPainterPath &path) const
 
QPointF mapToScene (const QPointF &point) const
 
QPolygonF mapToScene (const QPolygonF &polygon) const
 
QPolygonF mapToScene (const QRectF &rectF) const
 
QPointF mapToScene (qreal x, qreal y) const
 
QPolygonF mapToScene (qreal x, qreal y, qreal width, qreal height) const
 
QMatrix matrix () const
 
void moveBy (qreal dx, qreal dy)
 
qreal opacity () const
 
virtual QPainterPath opaqueArea () const
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) = 0
 
QGraphicsItem * panel () const
 
PanelModality panelModality () const
 
QGraphicsItem * parentItem () const
 
QGraphicsObjectparentObject () const
 
QGraphicsWidgetparentWidget () const
 
QPointF pos () const
 
void removeSceneEventFilter (QGraphicsItem *filterItem)
 
void resetMatrix ()
 
void resetTransform ()
 
qreal rotation () const
 
qreal scale () const
 
QGraphicsScenescene () const
 
QRectF sceneBoundingRect () const
 
QMatrix sceneMatrix () const
 
QPointF scenePos () const
 
QTransform sceneTransform () const
 
void scroll (qreal dx, qreal dy, const QRectF &rectF=QRectF ())
 
void setAcceptDrops (bool on)
 
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
 
void setAcceptHoverEvents (bool enabled)
 
void setAcceptTouchEvents (bool enabled)
 
void setActive (bool active)
 
void setBoundingRegionGranularity (qreal granularity)
 
void setCacheMode (CacheMode mode, const QSize &cacheSize=QSize ())
 
void setCursor (const QCursor &cursor)
 
void setData (int key, const QVariant &value)
 
void setEnabled (bool enabled)
 
void setFiltersChildEvents (bool enabled)
 
void setFlag (GraphicsItemFlag flag, bool enabled=true)
 
void setFlags (GraphicsItemFlags flags)
 
void setFocus (Qt::FocusReason focusReason=Qt::OtherFocusReason)
 
void setFocusProxy (QGraphicsItem *graphicsItem)
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void setGroup (QGraphicsItemGroup *group)
 
void setHandlesChildEvents (bool enabled)
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
void setMatrix (const QMatrix &matrix, bool combine=false)
 
void setOpacity (qreal opacity)
 
void setPanelModality (PanelModality panelModality)
 
void setParentItem (QGraphicsItem *parent)
 
void setPos (const QPointF &pos)
 
void setPos (qreal x, qreal y)
 
void setRotation (qreal angle)
 
void setScale (qreal factor)
 
void setSelected (bool selected)
 
void setToolTip (const QString &toolTip)
 
void setTransform (const QTransform &matrix, bool combine=false)
 
void setTransformations (const QList< QGraphicsTransform * > &transformations)
 
void setTransformOriginPoint (const QPointF &origin)
 
void setTransformOriginPoint (qreal x, qreal y)
 
void setVisible (bool visible)
 
void setX (qreal x)
 
void setY (qreal y)
 
void setZValue (qreal z)
 
virtual QPainterPath shape () const
 
void show ()
 
void stackBefore (const QGraphicsItem *graphicsItem)
 
QGraphicsObjecttoGraphicsObject ()
 
const QGraphicsObjecttoGraphicsObject () const
 
QString toolTip () const
 
QGraphicsItem * topLevelItem () const
 
QGraphicsWidgettopLevelWidget () const
 
QTransform transform () const
 
QList< QGraphicsTransform * > transformations () const
 
QPointF transformOriginPoint () const
 
virtual int type () const
 
void ungrabKeyboard ()
 
void ungrabMouse ()
 
void unsetCursor ()
 
void update (const QRectF &rectF=QRectF ())
 
void update (qreal x, qreal y, qreal width, qreal height)
 
QGraphicsWidgetwindow () const
 
qreal x () const
 
qreal y () const
 
qreal zValue () const
 
- Public Methods inherited from QGraphicsLayoutItem
 QGraphicsLayoutItem (QGraphicsLayoutItem *parent=nullptr, bool isLayout=false)
 
virtual ~QGraphicsLayoutItem ()
 
QRectF contentsRect () const
 
QSizeF effectiveSizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF ()) const
 
QRectF geometry () const
 
QGraphicsItemgraphicsItem () const
 
bool isLayout () const
 
qreal maximumHeight () const
 
QSizeF maximumSize () const
 
qreal maximumWidth () const
 
qreal minimumHeight () const
 
QSizeF minimumSize () const
 
qreal minimumWidth () const
 
bool ownedByLayout () const
 
QGraphicsLayoutItem * parentLayoutItem () const
 
qreal preferredHeight () const
 
QSizeF preferredSize () const
 
qreal preferredWidth () const
 
void setMaximumHeight (qreal height)
 
void setMaximumSize (const QSizeF &size)
 
void setMaximumSize (qreal w, qreal h)
 
void setMaximumWidth (qreal width)
 
void setMinimumHeight (qreal height)
 
void setMinimumSize (const QSizeF &size)
 
void setMinimumSize (qreal w, qreal h)
 
void setMinimumWidth (qreal width)
 
void setParentLayoutItem (QGraphicsLayoutItem *parent)
 
void setPreferredHeight (qreal height)
 
void setPreferredSize (const QSizeF &size)
 
void setPreferredSize (qreal w, qreal h)
 
void setPreferredWidth (qreal width)
 
void setSizePolicy (const QSizePolicy &policy)
 
void setSizePolicy (QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType=QSizePolicy::DefaultType)
 
QSizePolicy sizePolicy () const
 

Protected Methods

void contextMenuEvent (QGraphicsSceneContextMenuEvent *) override
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *) override
 
void dragLeaveEvent (QGraphicsSceneDragDropEvent *) override
 
void dragMoveEvent (QGraphicsSceneDragDropEvent *) override
 
void dropEvent (QGraphicsSceneDragDropEvent *) override
 
void focusInEvent (QFocusEvent *) override
 
bool focusNextPrevChild (bool next) override
 
void focusOutEvent (QFocusEvent *) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *) override
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *) override
 
void inputMethodEvent (QInputMethodEvent *) override
 
void keyPressEvent (QKeyEvent *) override
 
void keyReleaseEvent (QKeyEvent *) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override
 
bool sceneEvent (QEvent *) override
 
void wheelEvent (QGraphicsSceneWheelEvent *) override
 
- Protected Methods inherited from QGraphicsWidget
virtual void changeEvent (QEvent *event)
 
virtual void closeEvent (QCloseEvent *event)
 
bool event (QEvent *event) override
 
void focusInEvent (QFocusEvent *event) override
 
void focusOutEvent (QFocusEvent *event) override
 
virtual void grabKeyboardEvent (QEvent *event)
 
virtual void grabMouseEvent (QEvent *event)
 
virtual void hideEvent (QHideEvent *event)
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void initStyleOption (QStyleOption *option) const
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual void moveEvent (QGraphicsSceneMoveEvent *event)
 
virtual void polishEvent ()
 
virtual void resizeEvent (QGraphicsSceneResizeEvent *event)
 
bool sceneEvent (QEvent *event) override
 
virtual void showEvent (QShowEvent *event)
 
virtual void ungrabKeyboardEvent (QEvent *event)
 
virtual void ungrabMouseEvent (QEvent *event)
 
virtual bool windowFrameEvent (QEvent *event)
 
virtual Qt::WindowFrameSection windowFrameSectionAt (const QPointF &pos) const
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Methods inherited from QGraphicsItem
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 
virtual void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dropEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
void prepareGeometryChange ()
 
virtual bool sceneEvent (QEvent *event)
 
virtual bool sceneEventFilter (QGraphicsItem *watched, QEvent *event)
 
void updateMicroFocus ()
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *event)
 
- Protected Methods inherited from QGraphicsLayoutItem
void setGraphicsItem (QGraphicsItem *item)
 
void setOwnedByLayout (bool owner)
 

Properties

 icon
 
 modified
 
 renderHints
 
 resizesToContents
 
 tiledBackingStoreFrozen
 
 title
 
 url
 
 zoomFactor
 
- Properties inherited from QGraphicsWidget
 autoFillBackground
 
 focusPolicy
 
 font
 
 geometry
 
 layout
 
 layoutDirection
 
 maximumSize
 
 minimumSize
 
 palette
 
 preferredSize
 
 size
 
 sizePolicy
 
 windowFlags
 
 windowTitle
 
- Properties inherited from QGraphicsObject
 effect
 
 enabled
 
 opacity
 
 parent
 
 pos
 
 rotation
 
 scale
 
 transformOriginPoint
 
 visible
 
 x
 
 y
 
 z
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Typedefs inherited from QGraphicsItem
using GraphicsItemFlags = QFlags< GraphicsItemFlag >
 
- Public Types inherited from QGraphicsItem
enum  CacheMode
 
enum  GraphicsItemChange
 
enum  GraphicsItemFlag
 
enum  PanelModality
 
- Static Public Methods inherited from QGraphicsWidget
static void setTabOrder (QGraphicsWidget *first, QGraphicsWidget *second)
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Slots inherited from QGraphicsObject
void updateMicroFocus ()
 

Detailed Description

The QGraphicsWebView class allows Web content to be added to a Graphics View System. An instance of this class renders Web content from a URL or supplied as data using features of the CsWebKit library. If the width and height of the item are not set, they will default to 800 and 600, respectively. If the Web page contents is larger scrollbars will be shown if not disabled explicitly.

Browser Features

Many of the functions, signals and properties provided by QWebView are also available for this item, making it simple to adapt existing code to use QGraphicsWebView instead of QWebView. The item uses a QWebPage object to perform the rendering of Web content, and this can be obtained with the page() function, enabling the document itself to be accessed and modified.

As with QWebView, the item records the browsing history using a QWebHistory object, accessible using the history() function. The QWebSettings object that defines the configuration of the browser can be obtained with the settings() function, enabling features like plugin support to be customized for each item.

See also
QWebView, QGraphicsTextItem

Constructor & Destructor Documentation

QGraphicsWebView::QGraphicsWebView ( QGraphicsItem parent = 0)
explicit

Constructs an empty QGraphicsWebView with parent parent.

See also
load()
QGraphicsWebView::~QGraphicsWebView ( )

Destroys the item.

Method Documentation

void QGraphicsWebView::back ( )
slot

Convenience slot that loads the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.

See also
forward()
void QGraphicsWebView::contextMenuEvent ( QGraphicsSceneContextMenuEvent event)
overrideprotected

Reimplemented from QGraphicsItem::contextMenuEvent().

void QGraphicsWebView::dragEnterEvent ( QGraphicsSceneDragDropEvent event)
overrideprotected

Reimplemented from QGraphicsItem::dragEnterEvent().

void QGraphicsWebView::dragLeaveEvent ( QGraphicsSceneDragDropEvent event)
overrideprotected

Reimplemented from QGraphicsItem::dragLeaveEvent().

void QGraphicsWebView::dragMoveEvent ( QGraphicsSceneDragDropEvent event)
overrideprotected

Reimplemented from QGraphicsItem::dragMoveEvent().

void QGraphicsWebView::dropEvent ( QGraphicsSceneDragDropEvent event)
overrideprotected

Reimplemented from QGraphicsItem::dropEvent().

bool QGraphicsWebView::event ( QEvent event)
override

Reimplemented from QObject::event().

bool QGraphicsWebView::findText ( const QString subString,
QWebPage::FindFlags  options = 0 
)

Finds the specified string, subString, in the page, using the given options.

If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences that exist in the page. All subsequent calls will extend the highlight, rather than replace it, with occurrences of the new string.

If the HighlightAllOccurrences flag is not passed, the function will select an occurrence and all subsequent calls will replace the current occurrence with the next one.

To clear the selection, just pass an empty string.

Returns true if subString was found, otherwise returns false.

See also
QWebPage::selectedText(), QWebPage::selectionChanged()
void QGraphicsWebView::focusInEvent ( QFocusEvent event)
overrideprotected

Reimplemented from QGraphicsItem::focusInEvent().

bool QGraphicsWebView::focusNextPrevChild ( bool  next)
overrideprotectedvirtual

Reimplemented from QGraphicsWidget::focusNextPrevChild().

Reimplemented from QGraphicsWidget.

void QGraphicsWebView::focusOutEvent ( QFocusEvent event)
overrideprotected

Reimplemented from QGraphicsItem::focusOutEvent().

void QGraphicsWebView::forward ( )
slot

Convenience slot that loads the next document in the list of documents built by navigating links. Does nothing if there is no next document.

See also
back()
QWebHistory * QGraphicsWebView::history ( ) const

Returns a pointer to the view's history of navigated web pages.

It is equivalent to

view->page()->history();
void QGraphicsWebView::hoverLeaveEvent ( QGraphicsSceneHoverEvent event)
overrideprotected

Reimplemented from QGraphicsItem::hoverLeaveEvent().

void QGraphicsWebView::hoverMoveEvent ( QGraphicsSceneHoverEvent event)
overrideprotected

Reimplemented from QGraphicsItem::hoverMoveEvent().

void QGraphicsWebView::iconChanged ( )
signal

This signal is emitted whenever the icon of the page is loaded or changes.

In order for icons to be loaded, you will need to set an icon database path using QWebSettings::setIconDatabasePath().

See also
icon(), QWebSettings::setIconDatabasePath()
void QGraphicsWebView::inputMethodEvent ( QInputMethodEvent event)
overrideprotected

Reimplemented from QGraphicsItem::inputMethodEvent().

QVariant QGraphicsWebView::inputMethodQuery ( Qt::InputMethodQuery  query) const
override

Reimplemented from QGraphicsItem::inputMethodQuery().

QVariant QGraphicsWebView::itemChange ( GraphicsItemChange  change,
const QVariant value 
)
override

Reimplemented from QGraphicsItem::itemChange().

void QGraphicsWebView::keyPressEvent ( QKeyEvent event)
overrideprotected

Reimplemented from QGraphicsItem::keyPressEvent().

void QGraphicsWebView::keyReleaseEvent ( QKeyEvent event)
overrideprotected

Reimplemented from QGraphicsItem::keyReleaseEvent().

void QGraphicsWebView::linkClicked ( const QUrl url)
signal

This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy property is set to delegate the link handling for the specified url.

See also
QWebPage::linkDelegationPolicy()
void QGraphicsWebView::load ( const QNetworkRequest request,
QNetworkAccessManager::Operation  operation = QNetworkAccessManager::GetOperation,
const QByteArray body = QByteArray() 
)

Loads a network request, request, using the method specified in operation.

body is optional and is only used for POST operations.

Note
The view remains the same until enough data has arrived to display the new url.
See also
url(), urlChanged()
void QGraphicsWebView::load ( const QUrl url)

Loads the specified url and displays it.

Note
The view remains the same until enough data has arrived to display the new url.
See also
setUrl(), url(), urlChanged()
void QGraphicsWebView::loadFinished ( bool  ok)
signal

This signal is emitted when a load of the page is finished. ok will indicate whether the load was successful or any error occurred.

See also
loadStarted()
void QGraphicsWebView::loadProgress ( int  progress)
signal

This signal is emitted every time an element in the web page completes loading and the overall loading progress advances.

This signal tracks the progress of all child frames.

The current value is provided by progress and scales from 0 to 100, which is the default range of QProgressBar.

See also
loadStarted(), loadFinished()
void QGraphicsWebView::loadStarted ( )
signal

This signal is emitted when a new load of the page is started.

See also
loadProgress(), loadFinished()
void QGraphicsWebView::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent event)
overrideprotected
void QGraphicsWebView::mouseMoveEvent ( QGraphicsSceneMouseEvent event)
overrideprotected

Reimplemented from QGraphicsItem::mouseMoveEvent().

void QGraphicsWebView::mousePressEvent ( QGraphicsSceneMouseEvent event)
overrideprotected

Reimplemented from QGraphicsItem::mousePressEvent().

void QGraphicsWebView::mouseReleaseEvent ( QGraphicsSceneMouseEvent event)
overrideprotected
QWebPage * QGraphicsWebView::page ( ) const

Returns a pointer to the underlying web page.

See also
setPage()
QAction * QGraphicsWebView::pageAction ( QWebPage::WebAction  action) const

Returns a pointer to a QAction that encapsulates the specified web action action.

void QGraphicsWebView::paint ( QPainter painter,
const QStyleOptionGraphicsItem option,
QWidget widget = 0 
)
override

Reimplemented from QGraphicsItem::paint().

void QGraphicsWebView::reload ( )
slot

Reloads the current document.

See also
stop(), loadStarted()
bool QGraphicsWebView::sceneEvent ( QEvent event)
overrideprotected

Reimplemented from QGraphicsItem::sceneEvent().

void QGraphicsWebView::setContent ( const QByteArray data,
const QString mimeType = QString(),
const QUrl baseUrl = QUrl() 
)

Sets the content of the web graphicsitem to the specified content data. If the mimeType argument is empty it is assumed the content is HTML.

External objects referenced in the content are located relative to baseUrl.

The data is loaded immediately; external objects are loaded asynchronously.

See also
load(), setHtml(), QWebFrame::toHtml()
void QGraphicsWebView::setGeometry ( const QRectF rect)
overridevirtual

Reimplemented from QGraphicsLayoutItem::setGeometry().

Reimplemented from QGraphicsWidget.

void QGraphicsWebView::setHtml ( const QString html,
const QUrl baseUrl = QUrl() 
)

Sets the content of the web view to the specified html.

External objects such as stylesheets or images referenced in the HTML document are located relative to baseUrl.

The html is loaded immediately; external objects are loaded asynchronously.

When using this method, WebKit assumes that external resources such as JavaScript programs or style sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external script can be specified through the charset attribute of the HTML script tag. Alternatively, the encoding can also be specified by the web server.

This is a convenience function equivalent to setContent(html, "text/html", baseUrl).

Warning
This function works only for HTML, for other mime types (i.e. XHTML, SVG) setContent() should be used instead.
See also
load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent()
void QGraphicsWebView::setPage ( QWebPage page)

Makes page the new web page of the web graphicsitem.

The parent QObject of the provided page remains the owner of the object. If the current document is a child of the web view, it will be deleted.

See also
page()
void QGraphicsWebView::setRenderHint ( QPainter::RenderHint  hint,
bool  enabled = true 
)

If enabled is true, enables the specified render hint, otherwise disables it.

See also
renderHints, QPainter::renderHints()
QWebSettings * QGraphicsWebView::settings ( ) const

Returns a pointer to the view/page specific settings object.

It is equivalent to

view->page()->settings();
See also
QWebSettings::globalSettings()
QSizeF QGraphicsWebView::sizeHint ( Qt::SizeHint  which,
const QSizeF constraint 
) const
overridevirtual

Reimplemented from QGraphicsLayoutItem::sizeHint().

Reimplemented from QGraphicsWidget.

void QGraphicsWebView::statusBarMessage ( const QString text)
signal

This signal is emitted when the statusbar text is changed by the page.

void QGraphicsWebView::stop ( )
slot

Convenience slot that stops loading the document.

See also
reload(), loadFinished()
void QGraphicsWebView::titleChanged ( const QString title)
signal

This signal is emitted whenever the title of the main frame changes.

See also
title()
void QGraphicsWebView::triggerPageAction ( QWebPage::WebAction  action,
bool  checked = false 
)

Triggers the specified action. If it is a checkable action the specified checked state is assumed.

See also
pageAction()
void QGraphicsWebView::updateGeometry ( )
overridevirtual

Reimplemented from QGraphicsLayoutItem::updateGeometry().

Reimplemented from QGraphicsWidget.

void QGraphicsWebView::urlChanged ( const QUrl url)
signal

This signal is emitted when the url of the view changes.

See also
url(), load()
void QGraphicsWebView::wheelEvent ( QGraphicsSceneWheelEvent event)
overrideprotected

Reimplemented from QGraphicsItem::wheelEvent().

Property Documentation

QGraphicsWebView::icon

This property holds the icon associated with the web page currently viewed.

By default, this property contains a null icon.

See also
iconChanged(), QWebSettings::iconForUrl()
PropertiesClass Methods
read icon
notify iconChanged
QGraphicsWebView::modified

This property holds whether the document was modified by the user.

Parts of HTML documents can be editable for example through the contenteditable attribute on HTML elements.

By default, this property is false.

PropertiesClass Methods
read isModified
QGraphicsWebView::renderHints

This property holds the default render hints for the view.

These hints are used to initialize QPainter before painting the Web page.

QPainter::TextAntialiasing and QPainter::SmoothPixmapTransform are enabled by default and will be used to render the item in addition of what has been set on the painter given by QGraphicsScene.

See also
QPainter::renderHints()
PropertiesClass Methods
read renderHints
write setRenderHints
QGraphicsWebView::resizesToContents

This property holds whether the size of the QGraphicsWebView and its viewport changes to match the contents size.

If this property is set, the QGraphicsWebView will automatically change its size to match the size of the main frame contents. As a result the top level frame will never have scrollbars. It will also make CSS fixed positioning to behave like absolute positioning with elements positioned relative to the document instead of the viewport.

This property should be used in conjunction with the QWebPage::preferredContentsSize property. If not explicitly set, the preferredContentsSize is automatically set to a reasonable value.

See also
QWebPage::setPreferredContentsSize()
PropertiesClass Methods
read resizesToContents
write setResizesToContents
QGraphicsWebView::tiledBackingStoreFrozen

This property holds whether the tiled backing store updates its contents.

If the tiled backing store is enabled using QWebSettings::TiledBackingStoreEnabled attribute, this property can be used to disable backing store updates temporarily. This can be useful for example for running a smooth animation that changes the scale of the QGraphicsWebView.

When the backing store is unfrozen, its contents will be automatically updated to match the current state of the document. If the QGraphicsWebView scale was changed, the backing store is also re-rendered using the new scale.

If the tiled backing store is not enabled, this property does nothing.

See also
QWebSettings::TiledBackingStoreEnabled, QGraphicsObject::scale
PropertiesClass Methods
read isTiledBackingStoreFrozen
write setTiledBackingStoreFrozen
QGraphicsWebView::title

This property holds the title of the web page currently viewed.

By default, this property contains an empty string.

See also
titleChanged()
PropertiesClass Methods
read title
notify titleChanged
QGraphicsWebView::url

This property holds the url of the web page currently viewed.

Setting this property clears the view and loads the URL.

By default, this property contains an empty, invalid URL.

See also
load(), urlChanged()
PropertiesClass Methods
read url
write setUrl
notify urlChanged
QGraphicsWebView::zoomFactor

This property holds the zoom factor for the view.

PropertiesClass Methods
read zoomFactor
write setZoomFactor