Qt 5.9 | ViewportAttributes

Qt 5.9.1 Reference Documentation

# ViewportAttributes Class

(QWebPage::ViewportAttributes)

The QWebPage::ViewportAttributes class describes hints that can be applied to a viewport. More...

Header: | #include <ViewportAttributes>
qmake: | QT += webkitwidgets
Since: | Qt 4.7

- List of all members, including inherited members

## Public Functions

| ViewportAttributes()
| ViewportAttributes(const ViewportAttributes &other)
| ~ViewportAttributes()
qreal | devicePixelRatio() const
qreal | initialScaleFactor() const
bool | isUserScalable() const
bool | isValid() const
qreal | maximumScaleFactor() const
qreal | minimumScaleFactor() const
QSizeF | size() const
ViewportAttributes & | operator=(const ViewportAttributes &other)

## Detailed Description

The QWebPage::ViewportAttributes class describes hints that can be applied to a viewport.

QWebPage::ViewportAttributes provides a description of a viewport, such as viewport geometry, initial scale factor with limits, plus information about whether a user should be able to scale the contents in the viewport or not, ie. by zooming.

ViewportAttributes can be set by a web author using the viewport meta tag extension, documented at Safari Reference Library: Using the Viewport Meta Tag.

All values might not be set, as such when dealing with the hints, the developer needs to check whether the values are valid. Negative values denote an invalid qreal value.

## Member Function Documentation

### ViewportAttributes::ViewportAttributes()

Constructs an empty QWebPage::ViewportAttributes.

### ViewportAttributes::ViewportAttributes(const ViewportAttributes &other)

Constructs a QWebPage::ViewportAttributes which is a copy from other .

### ViewportAttributes::~ViewportAttributes()

Destroys the QWebPage::ViewportAttributes.

### qreal ViewportAttributes::devicePixelRatio() const

### qreal ViewportAttributes::initialScaleFactor() const

### bool ViewportAttributes::isUserScalable() const

### bool ViewportAttributes::isValid() const

### qreal ViewportAttributes::maximumScaleFactor() const

### qreal ViewportAttributes::minimumScaleFactor() const

### QSizeF ViewportAttributes::size() const

### ViewportAttributes &ViewportAttributes::operator=(const ViewportAttributes &other)

Assigns the given QWebPage::ViewportAttributes to this viewport hints and returns a reference to this.