QTextLength Class ReferenceThe QTextLength class encapsulates the different types of length used in a QTextDocument. More... #include <QTextLength> Note: All functions in this class are reentrant. Public Types
Public Functions
Detailed DescriptionThe QTextLength class encapsulates the different types of length used in a QTextDocument. When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used. Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires. See also QTextTable. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QTextLength::VariableLength | 0 | The width of the object is variable |
QTextLength::FixedLength | 1 | The width of the object is fixed |
QTextLength::PercentageLength | 2 | The width of the object is in percentage of the maximum width |
See also type().
Constructs a new length object which represents a variable size.
Constructs a new length object of the given type and value.
Returns the constraint value that is specific for the type of the length. If the length is QTextLength::PercentageLength then the raw value is in percent, in the range of 0 to 100. If the length is QTextLength::FixedLength then that fixed amount is returned. For variable lengths, zero is returned.
Returns the type of this length object.
See also QTextLength::Type.
Returns the effective length, constrained by the type of the length object and the specified maximumLength.
See also type().
Returns the text length as a QVariant
Returns true if this text length is different from the other text length.
Returns true if this text length is the same as the other text length.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.