|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · 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.

### uint QSizePolicy::horStretch () const

Use horizontalStretch() instead.

### 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.

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

Use setHorizontalStretch(stretch) instead.

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

Use setVerticalPolicy(policy) instead.

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

Use setVerticalStretch(stretch) instead.

### Policy QSizePolicy::verData () const

Use verticalPolicy() instead.

### uint QSizePolicy::verStretch () const

Use verticalStretch() instead.