# class KHTMLView

###

Module | khtml
Namespace |
Class | KHTMLView
Inherits | QScrollArea

Renders and displays HTML in a QScrollArea.

Suitable for use as an application's main view.

### enums

- SmoothScrollingMode { SSMDisabled, SSMWhenEfficient, SSMEnabled }

enum details

### methods

- KHTMLView (part, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  part | KHTMLPart |
  parent | QWidget |

  Constructs a KHTMLView.

- addChild (child, dx, dy)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  child | QWidget |
  dx | int |
  dy | int |

- clear ( )

  returns Nothing

- cleared ( )

  returns Nothing
  SIGNAL ("cleared ()")

- closeEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QCloseEvent |

- contentsHeight ( )

  returns int

  Returns the contents area's height

- contentsToViewport (p)

  returns QPoint

  Argument | Type | Default
  --- | --- | ---
  p | QPoint |

  Returns a point translated to viewport coordinates

  p - the contents area point to translate

- contentsToViewport (x, y)

  returns Nothing, int (cx), int (cy)

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |

  Returns a point translated to viewport coordinates

  x - x coordinate of contents area point to translate

  y - y coordinate of contents area point to translate

  cx - resulting x coordinate

  cy - resulting y coordinate

- contentsWidth ( )

  returns int

  Returns the contents area's width

- contentsX ( )

  returns int

  Returns the x coordinate of the contents area point that is currently located at the top left in the viewport

- contentsY ( )

  returns int

  Returns the y coordinate of the contents area point that is currently located at the top left in the viewport

- displayAccessKeys ( )

  returns Nothing

  Display all accesskeys in small tooltips

- doAutoScroll ( )

  returns Nothing

- dragEnterEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QDragEnterEvent |

- dropEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QDropEvent |

- event (event)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  event | QEvent |

- eventFilter (a0, a1)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  a0 | QObject |
  a1 | QEvent |

- findAheadActive (a0)

  returns Nothing
  SIGNAL ("findAheadActive (bool)")

  Argument | Type | Default
  --- | --- | ---
  a0 | bool |

- finishedLayout ( )

  returns Nothing
  SIGNAL ("finishedLayout ()")

  This signal is used for internal layouting. Don't use it to check if rendering finished. Use KHTMLPart completed() signal instead.

- focusInEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QFocusEvent |

- focusNextPrevChild (next)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  next | bool |

- focusOutEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QFocusEvent |

- frameWidth ( )

  returns int

- hideAccessKeys ( )

  returns Nothing
  SIGNAL ("hideAccessKeys ()")

- hideEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QHideEvent |

- keyPressEvent (_ke)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  _ke | QKeyEvent |

- keyReleaseEvent (_ke)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  _ke | QKeyEvent |

- layout ( )

  returns Nothing

  ensure the display is up to date

- marginHeight ( )

  returns int

  Returns the margin height.

  A return value of -1 means the default value will be used.

- marginWidth ( )

  returns int

  Returns the margin width.

  A return value of -1 means the default value will be used.

- mouseDoubleClickEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- mouseMoveEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- mousePressEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- mouseReleaseEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- paintEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QPaintEvent |

- part ( )

  returns KHTMLPart

  Returns a pointer to the KHTMLPart that is rendering the page.

- print (quick)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  quick | bool | 0

  Prints the HTML document.

  quick - if true, fully automated printing, without print dialog

- repaintAccessKeys ( )

  returns Nothing
  SIGNAL ("repaintAccessKeys ()")

- repaintContents (r)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  r | QRect |

  Requests an immediate repaint of the content area

  r - the content area rectangle to repaint

- repaintContents (x, y, w, h)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |
  w | int |
  h | int |

- resizeContents (w, h)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  w | int |
  h | int |

  Resize the contents area

  w - the new width

  h - the new height

- resizeEvent (event)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  event | QResizeEvent |

- scrollBy (x, y)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |

  Scrolls the content area by a given amount

  x - x offset

  y - y offset

- scrollContentsBy (dx, dy)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  dx | int |
  dy | int |

- setContentsPos (x, y)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |

  Place the contents area point x/y at the top left of the viewport

- setHorizontalScrollBarPolicy (policy)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  policy | Qt.ScrollBarPolicy |

  Sets horizontal scrollbar mode.

  WARNING: do not call this method on a base class pointer unless you specifically want QAbstractScrollArea's variant (not recommended). QAbstractScrollArea.setHorizontalScrollBarPolicy is *not* virtual.

- setMarginHeight (y)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  y | int |

- setMarginWidth (x)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x | int |

  Sets a margin in x direction.

- setSmoothScrollingMode (m)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  m | KHTMLView.SmoothScrollingMode |

  Set the smooth scrolling mode.

  Smooth scrolling mode is normally controlled by the configuration file's SmoothScrolling key. Using this setter will override the configuration file's settings.

  @since 4.1

- setSmoothScrollingModeDefault (m)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  m | KHTMLView.SmoothScrollingMode |

- setVerticalScrollBarPolicy (policy)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  policy | Qt.ScrollBarPolicy |

  Sets vertical scrollbar mode.

  WARNING: do not call this method on a base class pointer unless you specifically want QAbstractScrollArea's variant (not recommended). QAbstractScrollArea.setVerticalScrollBarPolicy is *not* virtual.

- setZoomLevel (percent)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  percent | int |

  Apply a zoom level to the content area

  percent - a zoom level expressed as a percentage

- showEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QShowEvent |

- slotPaletteChanged ( )

  returns Nothing

- smoothScrollingMode ( )

  returns KHTMLView.SmoothScrollingMode
  KDE 4.1.0 and later only

  Retrieve the current smooth scrolling mode

  @since 4.1

- timerEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QTimerEvent |

- updateContents (r)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  r | QRect |

  Requests an update of the content area

  r - the content area rectangle to update

- updateContents (x, y, w, h)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |
  w | int |
  h | int |

- viewportEvent (e)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  e | QEvent |

- viewportToContents (p)

  returns QPoint

  Argument | Type | Default
  --- | --- | ---
  p | QPoint |

  Returns a point translated to contents area coordinates

  p - the viewport point to translate

- viewportToContents (x, y)

  returns Nothing, int (cx), int (cy)

  Argument | Type | Default
  --- | --- | ---
  x | int |
  y | int |

  Returns a point translated to contents area coordinates

  x - x coordinate of viewport point to translate

  y - y coordinate of viewport point to translate

  cx - resulting x coordinate

  cy - resulting y coordinate

- visibleHeight ( )

  returns int

  Returns the height of the viewport

- visibleWidth ( )

  returns int

  Returns the width of the viewport

- wheelEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QWheelEvent |

- widgetEvent (a0)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  a0 | QEvent |

- zoomLevel ( )

  returns int

  Retrieve the current zoom level

- zoomView (a0)

  returns Nothing
  SIGNAL ("zoomView (int)")

  Argument | Type | Default
  --- | --- | ---
  a0 | int |

### enums - detail

- SmoothScrollingMode { SSMDisabled, SSMWhenEfficient, SSMEnabled }

  Smooth Scrolling Mode enumeration

- SSMDisabled smooth scrolling is disabled
- SSMWhenEfficient only use smooth scrolling on pages that do not require a full repaint of the content area when scrolling
- SSMAlways smooth scrolling is performed unconditionally

| SSMDisabled | - 0 | - |
| SSMWhenEfficient | - | - |
| SSMEnabled | - | - |