MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

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.

Public Types

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

Public Functions

QSizePolicy ( Policy horizontal, Policy vertical, bool dependent )
QSizePolicy ( Policy horizontal, Policy vertical, uchar horizontalStretch, uchar verticalStretch, bool dependent = 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 the Qt::Orientations enum 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 the QSizePolicy::Policy enum instead.

Member Function Documentation

QSizePolicy::QSizePolicy ( Policy horizontal, Policy vertical, bool dependent )

Use the QSizePolicy() constructor and the setHeightForWidth() function instead.

For example, if you have code like

 QSizePolicy *policy = new QSizePolicy(horizontal, vertical, dependent);

you can rewrite it as

 QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
 policy->setHeightForWidth(dependent);

QSizePolicy::QSizePolicy ( Policy horizontal, Policy vertical, uchar horizontalStretch, uchar verticalStretch, bool dependent = false )

Use the QSizePolicy() constructor and call the setHorizontalStretch(), setVerticalStretch(), and setHeightForWidth() functions instead.

For example, if you have code like

 QSizePolicy *policy = new QSizePolicy(horizontal, vertical,
                                                          horizontalStretch, verticalStretch,
                                                          dependent);

you can rewrite it as

 QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
 policy->setHorizontalStretch(horizontalStretch);
 policy->setVerticalStretch(verticalStretch);
 policy->setHeightForWidth(dependent);

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 the horizontalPolicy() function combined with the QSizePolicy::PolicyFlag enum instead.

For example, if you have code like

 bool policy = mayGrowHorizontally();

you can rewrite it as

 bool policy = horizontalPolicy() & QSizePolicy::GrowFlag;

bool QSizePolicy::mayGrowVertically () const

Use the verticalPolicy() function combined with the QSizePolicy::PolicyFlag enum instead.

For example, if you have code like

 bool policy = mayGrowVertically();

you can rewrite it as

 bool policy = verticalPolicy() & QSizePolicy::GrowFlag;

bool QSizePolicy::mayShrinkHorizontally () const

Use the horizontalPolicy() function combined with the QSizePolicy::PolicyFlag enum instead.

For example, if you have code like

 bool policy = mayShrinkHorizontally();

you can rewrite it as

 bool policy = horizontalPolicy() & QSizePolicy::ShrinkFlag;

bool QSizePolicy::mayShrinkVertically () const

Use the verticalPolicy() function combined with the QSizePolicy::PolicyFlag enum instead.

For example, if you have code like

 bool policy = mayShrinkVertically();

you can rewrite it as

 bool policy = verticalPolicy() & QSizePolicy::ShrinkFlag;

void QSizePolicy::setHorData ( Policy policy )

Use setHorizontalPolicy() instead.

See also horData().

void QSizePolicy::setHorStretch ( uchar stretch )

Use setHorizontalStretch() instead.

See also horStretch().

void QSizePolicy::setVerData ( Policy policy )

Use setVerticalPolicy() instead.

See also verData().

void QSizePolicy::setVerStretch ( uchar stretch )

Use setVerticalStretch() instead.

See also verStretch().

Policy QSizePolicy::verData () const

Use verticalPolicy() instead.

See also setVerData().

uint QSizePolicy::verStretch () const

Use verticalStretch() instead.

See also setVerStretch().