QTreeWidgetItem Class Reference
|
Constant | Value | Description |
---|---|---|
QTreeWidgetItem::ShowIndicator | 0 | The controls for expanding and collapsing will be shown for this item even if there are no children. |
QTreeWidgetItem::DontShowIndicator | 1 | The controls for expanding and collapsing will never be shown even if there are children. If the node is forced open the user will not be able to expand or collapse the item. |
QTreeWidgetItem::DontShowIndicatorWhenChildless | 2 | The controls for expanding and collapsing will be shown if the item contains children. |
This enum was introduced in Qt 4.3.
This enum describes the types that are used to describe tree widget items.
Constant | Value | Description |
---|---|---|
QTreeWidgetItem::Type | 0 | The default type for tree widget items. |
QTreeWidgetItem::UserType | 1000 | The minimum value for custom types. Values below UserType are reserved by Qt. |
You can define new user types in QTreeWidgetItem subclasses to ensure that custom items are treated specially; for example, when items are sorted.
See also type().
Constructs a tree widget item of the specified type. The item must be inserted into a tree widget.
See also type().
Constructs a tree widget item of the specified type. The item must be inserted into a tree widget. The given list of strings will be set as the item text for each column in the item.
See also type().
Constructs a tree widget item of the specified type and appends it to the items in the given parent.
See also type().
Constructs a tree widget item of the specified type and appends it to the items in the given parent. The given list of strings will be set as the item text for each column in the item.
See also type().
Constructs a tree widget item of the specified type and inserts it into the given parent after the preceding item.
See also type().
Constructs a tree widget item and append it to the given parent.
See also type().
Constructs a tree widget item and append it to the given parent. The given list of strings will be set as the item text for each column in the item.
See also type().
Constructs a tree widget item of the specified type that is inserted into the parent after the preceding child item.
See also type().
Constructs a copy of other. Note that type() and treeWidget() are not copied.
This function is useful when reimplementing clone().
This function was introduced in Qt 4.1.
Destroys this tree widget item.
Appends the child item to the list of children.
See also insertChild() and takeChild().
Appends the given list of children to the item.
This function was introduced in Qt 4.1.
See also insertChildren() and takeChildren().
Returns the brush used to render the background of the specified column.
This function was introduced in Qt 4.2.
See also setBackground() and foreground().
Returns the check state of the label in the given column.
See also setCheckState() and Qt::CheckState.
Returns the item at the given index in the list of the item's children.
See also parent().
Returns the number of child items.
Returns the item indicator policy. This policy decides when the tree branch expand/collapse indicator is shown.
See also setChildIndicatorPolicy().
Creates a deep copy of the item and of its children.
Returns the number of columns in the item.
Returns the value for the item's column and role.
See also setData().
Returns the flags used to describe the item. These determine whether the item can be checked, edited, and selected.
The default value for flags is Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled. If the item was constructed with a parent, flags will in addition contain Qt::ItemIsDropEnabled.
See also setFlags().
Returns the font used to render the text in the specified column.
See also setFont().
Returns the brush used to render the foreground (e.g. text) of the specified column.
This function was introduced in Qt 4.2.
See also setForeground() and background().
Returns the icon that is displayed in the specified column.
See also setIcon() and iconSize.
Returns the index of the given child in the item's list of children.
Inserts the child item at index in the list of children.
If the child has already been inserted somewhere else it wont be inserted again.
Inserts the given list of children into the list of the item children at index .
Children that have already been inserted somewhere else wont be inserted.
This function was introduced in Qt 4.1.
Returns true if the item is disabled; otherwise returns false.
This function was introduced in Qt 4.3.
See also setFlags().
Returns true if the item is expanded, otherwise returns false.
This function was introduced in Qt 4.2.
See also setExpanded().
Returns true if the item is spanning all the columns in a row; otherwise returns false.
This function was introduced in Qt 4.3.
See also setFirstColumnSpanned().
Returns true if the item is hidden, otherwise returns false.
This function was introduced in Qt 4.2.
See also setHidden().
Returns true if the item is selected, otherwise returns false.
This function was introduced in Qt 4.2.
See also setSelected().
Returns the item's parent.
See also child().
Reads the item from stream in. This only reads data into a single item.
See also write().
Removes the given item indicated by child. The removed item will not be deleted.
Sets the background brush of the label in the given column to the specified brush.
This function was introduced in Qt 4.2.
See also background() and setForeground().
Sets the item in the given column check state to be state.
See also checkState().
Sets the item indicator policy. This policy decides when the tree branch expand/collapse indicator is shown. The default value is ShowForChildren.
See also childIndicatorPolicy().
Sets the value for the item's column and role to the given value.
The role describes the type of data specified by value, and is defined by the Qt::ItemDataRole enum.
See also data().
Disables the item if disabled is true; otherwise enables the item.
This function was introduced in Qt 4.3.
See also isDisabled() and setFlags().
Expands the item if expand is true, otherwise collapses the item.
Warning: The QTreeWidgetItem must be added to the QTreeWidget before calling this function.
This function was introduced in Qt 4.2.
See also isExpanded().
Sets the first section to span all columns if span is true; otherwise all item sections are shown.
This function was introduced in Qt 4.3.
See also isFirstColumnSpanned().
Sets the flags for the item to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item.
See also flags().
Sets the font used to display the text in the given column to the given font.
See also font(), setText(), and setForeground().
Sets the foreground brush of the label in the given column to the specified brush.
This function was introduced in Qt 4.2.
See also foreground() and setBackground().
Hides the item if hide is true, otherwise shows the item.
This function was introduced in Qt 4.2.
See also isHidden().
Sets the icon to be displayed in the given column to icon.
See also icon(), setText(), and iconSize.
Sets the selected state of the item to select.
This function was introduced in Qt 4.2.
See also isSelected().
Sets the size hint for the tree item in the given column to be size. If no size hint is set, the item delegate will compute the size hint based on the item data.
This function was introduced in Qt 4.1.
See also sizeHint().
Sets the status tip for the given column to the given statusTip. QTreeWidget mouse tracking needs to be enabled for this feature to work.
See also statusTip(), setToolTip(), and setWhatsThis().
Sets the text to be displayed in the given column to the given text.
See also text(), setFont(), and setForeground().
Sets the text alignment for the label in the given column to the alignment specified (see Qt::AlignmentFlag).
See also textAlignment().
Sets the tooltip for the given column to toolTip.
See also toolTip(), setStatusTip(), and setWhatsThis().
Sets the "What's This?" help for the given column to whatsThis.
See also whatsThis(), setStatusTip(), and setToolTip().
Returns the size hint set for the tree item in the given column (see QSize).
This function was introduced in Qt 4.1.
See also setSizeHint().
Sorts the children of the item using the given order, by the values in the given column.
Note: This function does nothing if the item is not associated with a QTreeWidget.
This function was introduced in Qt 4.2.
Returns the status tip for the contents of the given column.
See also setStatusTip().
Removes the item at index and returns it, otherwise return 0.
Removes the list of children and returns it, otherwise returns an empty list.
This function was introduced in Qt 4.1.
Returns the text in the specified column.
See also setText().
Returns the text alignment for the label in the given column (see Qt::AlignmentFlag).
See also setTextAlignment().
Returns the tool tip for the given column.
See also setToolTip().
Returns the tree widget that contains the item.
Returns the type passed to the QTreeWidgetItem constructor.
Returns the "What's This?" help for the contents of the given column.
See also setWhatsThis().
Writes the item to stream out. This only writes data from one single item.
See also read().
Returns true if the text in the item is less than the text in the other item, otherwise returns false.
Assigns other's data and flags to this item. Note that type() and treeWidget() are not copied.
This function is useful when reimplementing clone().
This is an overloaded member function, provided for convenience.
Writes the tree widget item item to stream out.
This operator uses QTreeWidgetItem::write().
See also Format of the QDataStream Operators.
This is an overloaded member function, provided for convenience.
Reads a tree widget item from stream in into item.
This operator uses QTreeWidgetItem::read().
See also Format of the QDataStream Operators.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com