Home · All Namespaces · 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.

Public Types

Public Functions


Member Type Documentation

enum QSizePolicy::ExpandData

Use the Qt::Orientations enum instead.

ConstantValueDescription
QSizePolicy::NoDirection0x0Use 0 instead.
QSizePolicy::Horizontally0x1Use Qt::Horizontal instead.
QSizePolicy::Vertically0x2Use Qt::Vertical instead.
QSizePolicy::BothDirections0x3Use 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().


Copyright © 2008 Nokia Trademarks
Qt 4.4.3