Workspace 6.21.5
Public Member Functions | List of all members
QtBrowserItem Class Reference

The QtBrowserItem class represents a property in a property browser instance. More...

#include <Workspace/Widgets/PropertyBrowser/qtpropertybrowser.h>

Public Member Functions

QtAbstractPropertyBrowserbrowser () const
 
QList< QtBrowserItem * > children () const
 
QtBrowserItemparent () const
 
QtPropertyproperty () const
 

Detailed Description

Browser items are created whenever a QtProperty is inserted to the property browser. A QtBrowserItem uniquely identifies a browser's item. Thus, if the same QtProperty is inserted multiple times, each occurrence gets its own unique QtBrowserItem. The items are owned by QtAbstractPropertyBrowser and automatically deleted when they are removed from the browser.

You can traverse a browser's properties by calling parent() and children(). The property and the browser associated with an item are available as property() and browser().

See also
QtAbstractPropertyBrowser, QtProperty

Member Function Documentation

◆ browser()

QtAbstractPropertyBrowser * browser ( ) const

Returns the property browser which owns this item.

◆ children()

QList< QtBrowserItem * > children ( ) const

Returns the children items of this item. The properties reproduced from children items are always the same as reproduced from associated property' children, for example:

QList<QtBrowserItem* > childrenItems = item->children();
QList<QtProperty* > childrenProperties = item->property()->subProperties();
The QtBrowserItem class represents a property in a property browser instance.
Definition: qtpropertybrowser.h:306
QList< QtBrowserItem * > children() const
Definition: qtpropertybrowser.cpp:1354
QtProperty * property() const
Definition: qtpropertybrowser.cpp:1322
QList< QtProperty * > subProperties() const
Definition: qtpropertybrowser.cpp:219

The childrenItems list represents the same list as childrenProperties.

◆ parent()

QtBrowserItem * parent ( ) const

Returns the parent item of this item. Returns 0 if this item is associated with top-level property in item's property browser.

See also
children()

◆ property()

QtProperty * property ( ) const

Returns the property which is associated with this item. Note that several items can be associated with the same property instance in the same property browser.

See also
QtAbstractPropertyBrowser::items()