Qt 3 Support Members for QSizePolicyThe 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
|
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. |
Use the QSizePolicy::Policy enum instead.
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);
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);
Use expandingDirections() instead.
Use horizontalPolicy() instead.
See also setHorData().
Use horizontalStretch() instead.
See also setHorStretch().
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;
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;
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;
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;
Use setHorizontalPolicy() instead.
See also horData().
Use setHorizontalStretch() instead.
See also horStretch().
Use setVerticalPolicy() instead.
See also verData().
Use setVerticalStretch() instead.
See also verStretch().
Use verticalPolicy() instead.
See also setVerData().
Use verticalStretch() instead.
See also setVerStretch().