static class |
QSizePolicy.PolicyFlag
These flags are combined together to form the various Policy values:
Constant | Value | Description
| GrowFlag | 1 | The widget can grow beyond its size hint if necessary. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QSizePolicy
public QSizePolicy(QSizePolicy.Policy horizontal,
QSizePolicy.Policy vertical,
QSizePolicy.ControlType type)
Constructs a QSizePolicy object with the given horizontal and vertical policies, and the specified control type.
Use setHeightForWidth if the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with line wrapping).
- See Also:
- setHorizontalStretch,
setVerticalStretch,
controlType
QSizePolicy
public QSizePolicy()
Constructs a QSizePolicy object with Fixed as its horizontal and vertical policies.
The policies can be altered using the setHorizontalPolicy and setVerticalPolicy functions. Use the setHeightForWidth function if the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with line wrapping).
- See Also:
- setHorizontalStretch,
setVerticalStretch
QSizePolicy
public QSizePolicy(QSizePolicy.Policy horizontal,
QSizePolicy.Policy vertical)
Constructs a QSizePolicy object with the given horizontal and vertical policies, and DefaultType as the control type.
Use setHeightForWidth if the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with line wrapping).
- See Also:
- setHorizontalStretch,
setVerticalStretch
controlType
public final QSizePolicy.ControlType controlType()
Returns the control type associated with the widget for which this size policy applies.
- See Also:
- setControlType
expandingDirections
public final Qt.Orientations expandingDirections()
Returns whether a widget can make use of more space than the QWidget::sizeHint() function indicates.
A value of Qt::Horizontal or Qt::Vertical means that the widget can grow horizontally or vertically (i.e., the horizontal or vertical policy is Expanding or MinimumExpanding), whereas Qt::Horizontal | Qt::Vertical means that it can grow in both dimensions.
- See Also:
- horizontalPolicy,
verticalPolicy
hasHeightForWidth
public final boolean hasHeightForWidth()
Returns true if the widget's preferred height depends on its width; otherwise returns false.
- See Also:
- setHeightForWidth
horizontalPolicy
public final QSizePolicy.Policy horizontalPolicy()
Returns the horizontal component of the size policy.
- See Also:
- setHorizontalPolicy,
verticalPolicy,
horizontalStretch
horizontalStretch
public final int horizontalStretch()
Returns the horizontal stretch factor of the size policy.
- See Also:
- setHorizontalStretch,
verticalStretch,
horizontalPolicy
writeTo
public final void writeTo(QDataStream arg__1)
- Writes thisQSizePolicy to arg__1.
readFrom
public final void readFrom(QDataStream arg__1)
- Reads a QSizePolicy from arg__1.
setControlType
public final void setControlType(QSizePolicy.ControlType type)
Sets the control type associated with the widget for which this size policy applies to type.
The control type specifies the type of the widget for which this size policy applies. It is used by some styles, notably QMacStyle, to insert proper spacing between widgets. For example, the Mac OS X Aqua guidelines specify that push buttons should be separated by 12 pixels, whereas vertically stacked radio buttons only require 6 pixels.
- See Also:
- controlType,
QStyle::layoutSpacing
setHeightForWidth
public final void setHeightForWidth(boolean b)
Sets the flag determining whether the widget's preferred height depends on its width, to b.
- See Also:
- hasHeightForWidth
setHorizontalPolicy
public final void setHorizontalPolicy(QSizePolicy.Policy d)
Sets the horizontal component to the given d.
- See Also:
- horizontalPolicy,
setVerticalPolicy,
setHorizontalStretch
setHorizontalStretch
public final void setHorizontalStretch(byte stretchFactor)
Sets the horizontal stretch factor of the size policy to the given stretchFactor.
- See Also:
- horizontalStretch,
setVerticalStretch,
setHorizontalPolicy
setVerticalPolicy
public final void setVerticalPolicy(QSizePolicy.Policy d)
Sets the vertical component to the given d.
- See Also:
- verticalPolicy,
setHorizontalPolicy,
setVerticalStretch
setVerticalStretch
public final void setVerticalStretch(byte stretchFactor)
Sets the vertical stretch factor of the size policy to the given stretchFactor.
- See Also:
- verticalStretch,
setHorizontalStretch,
setVerticalPolicy
transpose
public final void transpose()
Swaps the horizontal and vertical policies and stretches.
verticalPolicy
public final QSizePolicy.Policy verticalPolicy()
Returns the vertical component of the size policy.
- See Also:
- setVerticalPolicy,
horizontalPolicy,
verticalStretch
verticalStretch
public final int verticalStretch()
Returns the vertical stretch factor of the size policy.
- See Also:
- setVerticalStretch,
horizontalStretch,
verticalPolicy
fromNativePointer
public static QSizePolicy fromNativePointer(QNativePointer nativePointer)
- This function returns the QSizePolicy instance pointed to by nativePointer
- Parameters:
nativePointer - the QNativePointer of which object should be returned.
nativePointerArray
public static QNativePointer nativePointerArray(QSizePolicy[] array)
- This function returns a QNativePointer that is pointing to the specified QSizePolicy array.
- Parameters:
array - the array that the returned pointer will point to.
- Returns:
- a QNativePointer that is pointing to the specified array.
equals
public boolean equals(java.lang.Object other)
-
- Overrides:
equals in class java.lang.Object
|