Qt 4.0: Qt 3 Support Members for QSizePolicy

|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Qt 3 Support Members for QSizePolicy

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

- QSizePolicy class reference

### Public Types

- enum ExpandData { NoDirection, Horizontally, Vertically, BothDirections }
- typedef SizeType

### Public Functions

- QSizePolicy ( Policy horizontal, Policy vertical, bool hfw )
- QSizePolicy ( Policy hPolicy, Policy vPolicy, uchar hStretch, uchar vStretch, bool hfw = false )
- Qt::Orientations expanding () const
- Policy horData () const
- uint horStretch () const
- bool mayGrowHorizontally () const
- bool mayGrowVertically () const
- bool mayShrinkHorizontally () const
- bool mayShrinkVertically () const
- void setHorData ( Policy policy )
- void setHorStretch ( uchar stretch )
- void setVerData ( Policy policy )
- void setVerStretch ( uchar stretch )
- Policy verData () const
- uint verStretch () const

## Member Type Documentation

### enum QSizePolicy::ExpandData

Use Qt::Orientations instead.

Constant | Value | Description
--- | --- | ---
`QSizePolicy::NoDirection` | `0x0` | Use 0 instead.
`QSizePolicy::Horizontally` | `0x1` | Use Qt::Horizontal instead.
`QSizePolicy::Vertically` | `0x2` | Use Qt::Vertical instead.
`QSizePolicy::BothDirections` | `0x3` | Use Qt::Horizontal | Qt::Vertical instead.

### typedef QSizePolicy::SizeType

Use QSizePolicy::Policy instead.

## Member Function Documentation

### QSizePolicy::QSizePolicy ( Policy horizontal, Policy vertical, bool hfw )

Use the QSizePolicy(horizontal, vertical) constructor and call setHeightForWidth(hfw).

### QSizePolicy::QSizePolicy ( Policy hPolicy, Policy vPolicy, uchar hStretch, uchar vStretch, bool hfw = false )

Use the QSizePolicy(hPolicy, vPolicy) constructor and call setHorizontalStretch(hStretch), setVerticalStretch(vStretch), and setHeightForWidth(hfw).

### Qt::Orientations QSizePolicy::expanding () const

Use expandingDirections() instead.

### Policy QSizePolicy::horData () const

Use horizontalPolicy() instead.

See also setHorData().

### uint QSizePolicy::horStretch () const

Use horizontalStretch() instead.

See also setHorStretch().

### bool QSizePolicy::mayGrowHorizontally () const

Use horizontalPolicy() & QSizePolicy::GrowFlag instead.

### bool QSizePolicy::mayGrowVertically () const

Use verticalPolicy() & QSizePolicy::GrowFlag instead.

### bool QSizePolicy::mayShrinkHorizontally () const

Use horizontalPolicy() & QSizePolicy::ShrinkFlag instead.

### bool QSizePolicy::mayShrinkVertically () const

Use verticalPolicy() & QSizePolicy::ShrinkFlag instead.

### void QSizePolicy::setHorData ( Policy policy )

Use setHorizontalPolicy(policy) instead.

See also horData().

### void QSizePolicy::setHorStretch ( uchar stretch )

Use setHorizontalStretch(stretch) instead.

See also horStretch().

### void QSizePolicy::setVerData ( Policy policy )

Use setVerticalPolicy(policy) instead.

See also verData().

### void QSizePolicy::setVerStretch ( uchar stretch )

Use setVerticalStretch(stretch) instead.

See also verStretch().

### Policy QSizePolicy::verData () const

Use verticalPolicy() instead.

See also setVerData().

### uint QSizePolicy::verStretch () const

Use verticalStretch() instead.

See also setVerStretch().