IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

TreeViewStyle QML Type

Provides custom styling for TreeView.

This type was introduced in Qt 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

TreeViewStyle QML Type

  • Import Statement: import QtQuick.Controls.Styles 1.4

  • Since: Qt 5.5

  • Inherits: ScrollViewStyle

  • Group: TreeViewStyle is part of Styling Views, Styling Controls

Detailed Description

 

Property Documentation

 

activateItemOnSingleClick : bool

Activates items on single click.

Its default value is false.

alternateBackgroundColor : color

The alternate background color.

backgroundColor : color

The background color.

branchDelegate : Component

This property defines a delegate to draw the branch indicator.

In the branch delegate you have access to the following special properties:

  • styleData.row - the index of the view row

  • styleData.column - the index of the view column. Will always be 0

  • styleData.selected - if the item is currently selected

  • styleData.textColor - the default text color for an item

  • styleData.index - the QModelIndex of the current item in the model

  • styleData.depth - the depth of the current item in the tree model

  • styleData.isExpanded - true when the item is expanded

  • styleData.hasChildren - true if the model index of the current item has children

  • styleData.hasSibling - true if the model index of the current item has sibling

control : TreeView

The TreeView this style is attached to.

headerDelegate : Component

Delegate for header. This delegate is described in TreeView.headerDelegate.

highlightedTextColor : color

The text highlight color, used within selections.

indentation : int

The amount each level is indented relatively to its parent level.

itemDelegate : Component

Delegate for item. This delegate is described in TreeView.itemDelegate.

padding group

padding.bottom : int

padding.left : int

padding.right : int

padding.top : int

This grouped property holds the top, left, right and bottom padding.

rowDelegate : Component

Delegate for row. This delegate is described in TreeView.rowDelegate.

textColor : color

The text color.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+