QTreeWidget

Creates a tree view that uses a predefined tree model.

This class is a JS wrapper around Qt's QTreeWidget class

Example

const { QMainWindow, QTreeWidgetItem, QTreeWidget } = require("@nodegui/nodegui");
const win = new QMainWindow();
const tree = new QTreeWidget();
const item1 = new QTreeWidgetItem();
item1.setText(0, `item-1`);
const item2 = new QTreeWidgetItem();
item2.setText(0, `item-2`);
const item3 = new QTreeWidgetItem();
item3.setText(0, `item-3`);
const item4 = new QTreeWidgetItem();
item4.setText(0, `item-4`);
const item5 = new QTreeWidgetItem();
item5.setText(0, `item-5`);
const item6 = new QTreeWidgetItem();
item6.setText(0, `item-6`);
tree.addTopLevelItem(item1);
tree.insertTopLevelItems(0, [item2, item3]);
tree.addTopLevelItems([item4, item5]);
tree.insertTopLevelItem(2, item6);
// Add children to item1
const c1item1 = new QTreeWidgetItem(item1);
c1item1.setText(0, `c1item1`);
const c1item2 = new QTreeWidgetItem(item1);
c1item2.setText(0, `c1item1`);
win.setCentralWidget(tree);
win.show();
(global as any).win = win;```
## Hierarchy
↳ [QAbstractScrollArea](qabstractscrollarea.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)›
↳ **QTreeWidget**
## Index
### Constructors
* [constructor](qtreewidget.md#constructor)
### Properties
* [_layout](qtreewidget.md#optional-_layout)
* [_rawInlineStyle](qtreewidget.md#_rawinlinestyle)
* [actions](qtreewidget.md#actions)
* [itemWidgets](qtreewidget.md#itemwidgets)
* [native](qtreewidget.md#native)
* [nodeChildren](qtreewidget.md#nodechildren)
* [nodeParent](qtreewidget.md#optional-nodeparent)
* [topLevelItems](qtreewidget.md#toplevelitems)
* [type](qtreewidget.md#type)
* [viewportWidget](qtreewidget.md#optional-viewportwidget)
### Accessors
* [layout](qtreewidget.md#layout)
### Methods
* [acceptDrops](qtreewidget.md#acceptdrops)
* [activateWindow](qtreewidget.md#activatewindow)
* [addAction](qtreewidget.md#addaction)
* [addEventListener](qtreewidget.md#addeventlistener)
* [addTopLevelItem](qtreewidget.md#addtoplevelitem)
* [addTopLevelItems](qtreewidget.md#addtoplevelitems)
* [adjustSize](qtreewidget.md#adjustsize)
* [clear](qtreewidget.md#clear)
* [clearFocus](qtreewidget.md#clearfocus)
* [close](qtreewidget.md#close)
* [currentItem](qtreewidget.md#currentitem)
* [eventProcessed](qtreewidget.md#eventprocessed)
* [findItems](qtreewidget.md#finditems)
* [font](qtreewidget.md#font)
* [frameRect](qtreewidget.md#framerect)
* [frameShadow](qtreewidget.md#frameshadow)
* [frameShape](qtreewidget.md#frameshape)
* [frameStyle](qtreewidget.md#framestyle)
* [frameWidth](qtreewidget.md#framewidth)
* [geometry](qtreewidget.md#geometry)
* [getFlexNode](qtreewidget.md#getflexnode)
* [hasMouseTracking](qtreewidget.md#hasmousetracking)
* [hide](qtreewidget.md#hide)
* [inherits](qtreewidget.md#inherits)
* [insertTopLevelItem](qtreewidget.md#inserttoplevelitem)
* [insertTopLevelItems](qtreewidget.md#inserttoplevelitems)
* [isActiveWindow](qtreewidget.md#isactivewindow)
* [isEnabled](qtreewidget.md#isenabled)
* [isVisible](qtreewidget.md#isvisible)
* [lineWidth](qtreewidget.md#linewidth)
* [lower](qtreewidget.md#lower)
* [mapFromGlobal](qtreewidget.md#mapfromglobal)
* [mapFromParent](qtreewidget.md#mapfromparent)
* [mapToGlobal](qtreewidget.md#maptoglobal)
* [mapToParent](qtreewidget.md#maptoparent)
* [maximumSize](qtreewidget.md#maximumsize)
* [maximumViewportSize](qtreewidget.md#maximumviewportsize)
* [midLineWidth](qtreewidget.md#midlinewidth)
* [minimumSize](qtreewidget.md#minimumsize)
* [move](qtreewidget.md#move)
* [objectName](qtreewidget.md#objectname)
* [pos](qtreewidget.md#pos)
* [property](qtreewidget.md#property)
* [raise](qtreewidget.md#raise)
* [removeAction](qtreewidget.md#removeaction)
* [removeEventListener](qtreewidget.md#removeeventlistener)
* [repaint](qtreewidget.md#repaint)
* [repolish](qtreewidget.md#repolish)
* [resize](qtreewidget.md#resize)
* [selectedItems](qtreewidget.md#selecteditems)
* [setAcceptDrops](qtreewidget.md#setacceptdrops)
* [setAttribute](qtreewidget.md#setattribute)
* [setColumnCount](qtreewidget.md#setcolumncount)
* [setColumnWidth](qtreewidget.md#setcolumnwidth)
* [setContextMenuPolicy](qtreewidget.md#setcontextmenupolicy)
* [setCursor](qtreewidget.md#setcursor)
* [setEnabled](qtreewidget.md#setenabled)
* [setEventProcessed](qtreewidget.md#seteventprocessed)
* [setFixedSize](qtreewidget.md#setfixedsize)
* [setFlexNodeSizeControlled](qtreewidget.md#setflexnodesizecontrolled)
* [setFocus](qtreewidget.md#setfocus)
* [setFocusPolicy](qtreewidget.md#setfocuspolicy)
* [setFont](qtreewidget.md#setfont)
* [setFrameRect](qtreewidget.md#setframerect)
* [setFrameShadow](qtreewidget.md#setframeshadow)
* [setFrameShape](qtreewidget.md#setframeshape)
* [setFrameStyle](qtreewidget.md#setframestyle)
* [setGeometry](qtreewidget.md#setgeometry)
* [setGraphicsEffect](qtreewidget.md#setgraphicseffect)
* [setHeaderHidden](qtreewidget.md#setheaderhidden)
* [setHeaderLabel](qtreewidget.md#setheaderlabel)
* [setHeaderLabels](qtreewidget.md#setheaderlabels)
* [setHorizontalScrollBar](qtreewidget.md#sethorizontalscrollbar)
* [setHorizontalScrollBarPolicy](qtreewidget.md#sethorizontalscrollbarpolicy)
* [setInlineStyle](qtreewidget.md#setinlinestyle)
* [setItemWidget](qtreewidget.md#setitemwidget)
* [setLayout](qtreewidget.md#setlayout)
* [setLineWidth](qtreewidget.md#setlinewidth)
* [setMaximumSize](qtreewidget.md#setmaximumsize)
* [setMidLineWidth](qtreewidget.md#setmidlinewidth)
* [setMinimumSize](qtreewidget.md#setminimumsize)
* [setMouseTracking](qtreewidget.md#setmousetracking)
* [setNodeParent](qtreewidget.md#setnodeparent)
* [setObjectName](qtreewidget.md#setobjectname)
* [setProperty](qtreewidget.md#setproperty)
* [setSortingEnabled](qtreewidget.md#setsortingenabled)
* [setStyleSheet](qtreewidget.md#setstylesheet)
* [setVerticalScrollBar](qtreewidget.md#setverticalscrollbar)
* [setVerticalScrollBarPolicy](qtreewidget.md#setverticalscrollbarpolicy)
* [setViewport](qtreewidget.md#setviewport)
* [setWindowFlag](qtreewidget.md#setwindowflag)
* [setWindowIcon](qtreewidget.md#setwindowicon)
* [setWindowOpacity](qtreewidget.md#setwindowopacity)
* [setWindowState](qtreewidget.md#setwindowstate)
* [setWindowTitle](qtreewidget.md#setwindowtitle)
* [show](qtreewidget.md#show)
* [showFullScreen](qtreewidget.md#showfullscreen)
* [showMaximized](qtreewidget.md#showmaximized)
* [showMinimized](qtreewidget.md#showminimized)
* [showNormal](qtreewidget.md#shownormal)
* [size](qtreewidget.md#size)
* [styleSheet](qtreewidget.md#stylesheet)
* [takeTopLevelItem](qtreewidget.md#taketoplevelitem)
* [testAttribute](qtreewidget.md#testattribute)
* [update](qtreewidget.md#update)
* [updateGeometry](qtreewidget.md#updategeometry)
* [viewport](qtreewidget.md#viewport)
* [windowOpacity](qtreewidget.md#windowopacity)
* [windowState](qtreewidget.md#windowstate)
* [windowTitle](qtreewidget.md#windowtitle)
## Constructors
### constructor
\+ **new QTreeWidget**(): *[QTreeWidget](qtreewidget.md)*
*Overrides [NodeWidget](nodewidget.md).[constructor](nodewidget.md#constructor)*
**Returns:** *[QTreeWidget](qtreewidget.md)*
\+ **new QTreeWidget**(`parent`: [NodeWidget](nodewidget.md)‹any›): *[QTreeWidget](qtreewidget.md)*
*Overrides [NodeWidget](nodewidget.md).[constructor](nodewidget.md#constructor)*
**Parameters:**
Name | Type |
------ | ------ |
`parent` | [NodeWidget](nodewidget.md)‹any› |
**Returns:** *[QTreeWidget](qtreewidget.md)*
## Properties
### `Optional` _layout
• **_layout**? : *[NodeLayout](nodelayout.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)›*
*Inherited from [QMenu](qmenu.md).[_layout](qmenu.md#optional-_layout)*
___
### _rawInlineStyle
• **_rawInlineStyle**: *string* = ""
*Inherited from [QMenu](qmenu.md).[_rawInlineStyle](qmenu.md#_rawinlinestyle)*
___
### actions
• **actions**: *Set‹[QAction](qaction.md)›*
*Inherited from [QMenu](qmenu.md).[actions](qmenu.md#actions)*
___
### itemWidgets
• **itemWidgets**: *Map‹[QTreeWidgetItem](qtreewidgetitem.md), [QWidget](qwidget.md)›*
___
### native
• **native**: *[NativeElement](../globals.md#nativeelement)*
*Overrides [Component](component.md).[native](component.md#abstract-native)*
___
### nodeChildren
• **nodeChildren**: *Set‹[Component](component.md)›*
*Inherited from [Component](component.md).[nodeChildren](component.md#nodechildren)*
___
### `Optional` nodeParent
• **nodeParent**? : *[Component](component.md)*
*Inherited from [Component](component.md).[nodeParent](component.md#optional-nodeparent)*
___
### topLevelItems
• **topLevelItems**: *Set‹[QTreeWidgetItem](qtreewidgetitem.md)›*
___
### type
• **type**: *string* = "widget"
*Inherited from [QMenu](qmenu.md).[type](qmenu.md#type)*
___
### `Optional` viewportWidget
• **viewportWidget**? : *[NodeWidget](nodewidget.md)‹any›*
*Inherited from [QAbstractScrollArea](qabstractscrollarea.md).[viewportWidget](qabstractscrollarea.md#optional-viewportwidget)*
## Accessors
### layout
• **get layout**(): *[NodeLayout](nodelayout.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)› | undefined*
*Inherited from [QMenu](qmenu.md).[layout](qmenu.md#layout)*
**Returns:** *[NodeLayout](nodelayout.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)› | undefined*
• **set layout**(`l`: [NodeLayout](nodelayout.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)› | undefined): *void*
*Inherited from [QMenu](qmenu.md).[layout](qmenu.md#layout)*
**Parameters:**
Name | Type |
------ | ------ |
`l` | [NodeLayout](nodelayout.md)‹[QTreeWidgetSignals](../interfaces/qtreewidgetsignals.md)› | undefined |
**Returns:** *void*
## Methods
### acceptDrops
▸ **acceptDrops**(): *boolean*
*Inherited from [QMenu](qmenu.md).[acceptDrops](qmenu.md#acceptdrops)*
**Returns:** *boolean*
___
### activateWindow
▸ **activateWindow**(): *void*
*Inherited from [QMenu](qmenu.md).[activateWindow](qmenu.md#activatewindow)*
**Returns:** *void*
___
### addAction
▸ **addAction**(`action`: [QAction](qaction.md) | string): *[QAction](qaction.md)*
*Inherited from [QMenu](qmenu.md).[addAction](qmenu.md#addaction)*
**Parameters:**
Name | Type |
------ | ------ |
`action` | [QAction](qaction.md) | string |
**Returns:** *[QAction](qaction.md)*
___
### addEventListener
▸ **addEventListener**‹**SignalType**›(`signalType`: SignalType, `callback`: QTreeWidgetSignals[SignalType]): *void*
*Inherited from [EventWidget](eventwidget.md).[addEventListener](eventwidget.md#addeventlistener)*
**Type parameters:**
▪ **SignalType**: *keyof QTreeWidgetSignals*
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`signalType` | SignalType | SignalType is a signal from the widgets signals interface. |
`callback` | QTreeWidgetSignals[SignalType] | Corresponding callback for the signal as mentioned in the widget's signal interface |
**Returns:** *void*
void
For example in the case of QPushButton:
```js
const button = new QPushButton();
button.addEventListener('clicked',(checked)=>console.log("clicked"));
// here clicked is a value from QPushButtonSignals interface

addEventListener(eventType: WidgetEventTypes, callback: function): void

Inherited from EventWidget.addEventListener

Parameters:

eventType: WidgetEventTypes

callback: function

For example in the case of QPushButton:

const button = new QPushButton();
button.addEventListener(WidgetEventTypes.HoverEnter,()=>console.log("hovered"));

▸ (event?: NativeRawPointer‹"QEvent"›): void

Parameters:

NameType
event?NativeRawPointer‹"QEvent"›

Returns: void


addTopLevelItem

addTopLevelItem(item: QTreeWidgetItem): void

Parameters:

NameType
itemQTreeWidgetItem

Returns: void


addTopLevelItems

addTopLevelItems(items: QTreeWidgetItem[]): void

Parameters:

NameType
itemsQTreeWidgetItem[]

Returns: void


adjustSize

adjustSize(): void

Inherited from QMenu.adjustSize

Returns: void


clear

clear(): void

Returns: void


clearFocus

clearFocus(): void

Inherited from QMenu.clearFocus

Returns: void


close

close(): boolean

Inherited from QMenu.close

Returns: boolean


currentItem

currentItem(): QTreeWidgetItem | void

Returns the current item in the tree widget.

Returns: QTreeWidgetItem | void


eventProcessed

eventProcessed(): boolean

Inherited from EventWidget.eventProcessed

Get the state of the event processed flag

See setEventProcessed().

Returns: boolean

boolean True if the current event is flagged as processed.


findItems

findItems(text: string, flags: MatchFlag, column: number): QTreeWidgetItem[]

Parameters:

NameType
textstring
flagsMatchFlag
columnnumber

Returns: QTreeWidgetItem[]


font

font(): QFont

Inherited from QMenu.font

Returns: QFont


frameRect

frameRect(): QRect

Inherited from NodeFrame.frameRect

Returns: QRect


frameShadow

frameShadow(): Shadow

Inherited from NodeFrame.frameShadow

Returns: Shadow


frameShape

frameShape(): Shape

Inherited from NodeFrame.frameShape

Returns: Shape


frameStyle

frameStyle(): number

Inherited from NodeFrame.frameStyle

Returns: number


frameWidth

frameWidth(): number

Inherited from NodeFrame.frameWidth

Returns: number


geometry

geometry(): QRect

Inherited from QMenu.geometry

Returns: QRect


getFlexNode

getFlexNode(): FlexNode

Inherited from YogaWidget.getFlexNode

Returns: FlexNode


hasMouseTracking

hasMouseTracking(): boolean

Inherited from QMenu.hasMouseTracking

Returns: boolean


hide

hide(): void

Inherited from QMenu.hide

Returns: void


inherits

inherits(className: string): boolean

Inherited from NodeObject.inherits

Parameters:

NameType
classNamestring

Returns: boolean


insertTopLevelItem

insertTopLevelItem(index: number, item: QTreeWidgetItem): void

Parameters:

NameType
indexnumber
itemQTreeWidgetItem

Returns: void


insertTopLevelItems

insertTopLevelItems(index: number, items: QTreeWidgetItem[]): void

Parameters:

NameType
indexnumber
itemsQTreeWidgetItem[]

Returns: void


isActiveWindow

isActiveWindow(): boolean

Inherited from QMenu.isActiveWindow

Returns: boolean


isEnabled

isEnabled(): boolean

Inherited from QMenu.isEnabled

Returns: boolean


isVisible

isVisible(): boolean

Inherited from QMenu.isVisible

Returns: boolean


lineWidth

lineWidth(): number

Inherited from NodeFrame.lineWidth

Returns: number


lower

lower(): void

Inherited from QMenu.lower

Returns: void


mapFromGlobal

mapFromGlobal(pos: QPoint): QPoint

Inherited from QMenu.mapFromGlobal

Parameters:

NameType
posQPoint

Returns: QPoint


mapFromParent

mapFromParent(pos: QPoint): QPoint

Inherited from QMenu.mapFromParent

Parameters:

NameType
posQPoint

Returns: QPoint


mapToGlobal

mapToGlobal(pos: QPoint): QPoint

Inherited from QMenu.mapToGlobal

Parameters:

NameType
posQPoint

Returns: QPoint


mapToParent

mapToParent(pos: QPoint): QPoint

Inherited from QMenu.mapToParent

Parameters:

NameType
posQPoint

Returns: QPoint


maximumSize

maximumSize(): QSize

Inherited from QMenu.maximumSize

Returns: QSize


maximumViewportSize

maximumViewportSize(): QSize

Inherited from QAbstractScrollArea.maximumViewportSize

Returns: QSize


midLineWidth

midLineWidth(): number

Inherited from NodeFrame.midLineWidth

Returns: number


minimumSize

minimumSize(): QSize

Inherited from QMenu.minimumSize

Returns: QSize


move

move(x: number, y: number): void

Inherited from QMenu.move

Parameters:

NameType
xnumber
ynumber

Returns: void


objectName

objectName(): string

Inherited from NodeObject.objectName

Returns: string


pos

pos(): object

Inherited from QMenu.pos

Returns: object

  • x: number

  • y: number


property

property(name: string): QVariant

Inherited from NodeObject.property

Parameters:

NameType
namestring

Returns: QVariant


raise

raise(): void

Inherited from QMenu.raise

Returns: void


removeAction

removeAction(action: QAction): void

Inherited from QMenu.removeAction

Parameters:

NameType
actionQAction

Returns: void


removeEventListener

removeEventListenerSignalType›(signalType: SignalType, callback: QTreeWidgetSignals[SignalType]): void

Inherited from EventWidget.removeEventListener

Type parameters:

SignalType: keyof QTreeWidgetSignals

Parameters:

NameType
signalTypeSignalType
callbackQTreeWidgetSignals[SignalType]

Returns: void

removeEventListener(eventType: WidgetEventTypes, callback: function): void

Inherited from EventWidget.removeEventListener

Parameters:

eventType: WidgetEventTypes

callback: function

▸ (event?: NativeRawPointer‹"QEvent"›): void

Parameters:

NameType
event?NativeRawPointer‹"QEvent"›

Returns: void


repaint

repaint(): void

Inherited from QMenu.repaint

Returns: void


repolish

repolish(): void

Inherited from QMenu.repolish

Returns: void


resize

resize(width: number, height: number): void

Inherited from QMenu.resize

Parameters:

NameType
widthnumber
heightnumber

Returns: void


selectedItems

selectedItems(): QTreeWidgetItem[]

Returns: QTreeWidgetItem[]


setAcceptDrops

setAcceptDrops(on: boolean): void

Inherited from QMenu.setAcceptDrops

Parameters:

NameType
onboolean

Returns: void


setAttribute

setAttribute(attribute: WidgetAttribute, switchOn: boolean): void

Inherited from QMenu.setAttribute

Parameters:

NameType
attributeWidgetAttribute
switchOnboolean

Returns: void


setColumnCount

setColumnCount(columnCount: number): void

Sets the column count of this QTreeWidget.

Parameters:

NameTypeDescription
columnCountnumberThe number of columns.

Returns: void


setColumnWidth

setColumnWidth(column: number, width: number): void

Sets the width of column of this QTreeWidget.

Parameters:

NameTypeDescription
columnnumberThe column index.
widthnumberThe size of the columns.

Returns: void


setContextMenuPolicy

setContextMenuPolicy(contextMenuPolicy: ContextMenuPolicy): void

Inherited from QMenu.setContextMenuPolicy

Parameters:

NameType
contextMenuPolicyContextMenuPolicy

Returns: void


setCursor

setCursor(cursor: CursorShape | QCursor): void

Inherited from QMenu.setCursor

Parameters:

NameType
cursorCursorShape | QCursor

Returns: void


setEnabled

setEnabled(enabled: boolean): void

Inherited from QMenu.setEnabled

Parameters:

NameType
enabledboolean

Returns: void


setEventProcessed

setEventProcessed(isProcessed: boolean): void

Inherited from EventWidget.setEventProcessed

Mark the current event as having been processed

This method is used to indicate that the currently dispatched event has been processed and no further processing by superclasses is required. It only makes sense to call this method from an event handler.

When set, this flag will cause NodeGui's QObject::event() method to return true and not call the superclass event(), effectively preventing any further processing on this event.

Parameters:

NameTypeDescription
isProcessedbooleantrue if the event has been processed.

Returns: void


setFixedSize

setFixedSize(width: number, height: number): void

Inherited from QMenu.setFixedSize

Parameters:

NameType
widthnumber
heightnumber

Returns: void


setFlexNodeSizeControlled

setFlexNodeSizeControlled(isSizeControlled: boolean): void

Inherited from YogaWidget.setFlexNodeSizeControlled

sets whether the widget's size is controlled by someone else (for example a window's size is controlled by its frame when dragged).

Parameters:

NameTypeDescription
isSizeControlledboolean

Returns: void


setFocus

setFocus(reason: FocusReason): void

Inherited from QMenu.setFocus

Parameters:

NameTypeDefault
reasonFocusReasonFocusReason.OtherFocusReason

Returns: void


setFocusPolicy

setFocusPolicy(policy: FocusPolicy): void

Inherited from QMenu.setFocusPolicy

Parameters:

NameType
policyFocusPolicy

Returns: void


setFont

setFont(font: QFont): void

Inherited from QMenu.setFont

Parameters:

NameType
fontQFont

Returns: void


setFrameRect

setFrameRect(r: QRect): void

Inherited from NodeFrame.setFrameRect

Parameters:

NameType
rQRect

Returns: void


setFrameShadow

setFrameShadow(type: Shadow): void

Inherited from NodeFrame.setFrameShadow

Parameters:

NameType
typeShadow

Returns: void


setFrameShape

setFrameShape(type: Shape): void

Inherited from NodeFrame.setFrameShape

Parameters:

NameType
typeShape

Returns: void


setFrameStyle

setFrameStyle(style: number): void

Inherited from NodeFrame.setFrameStyle

Parameters:

NameType
stylenumber

Returns: void


setGeometry

setGeometry(x: number, y: number, w: number, h: number): void

Inherited from QMenu.setGeometry

Parameters:

NameType
xnumber
ynumber
wnumber
hnumber

Returns: void


setGraphicsEffect

setGraphicsEffect(effect: QGraphicsEffect‹any›): void

Inherited from QMenu.setGraphicsEffect

Parameters:

NameType
effectQGraphicsEffect‹any›

Returns: void


setHeaderHidden

setHeaderHidden(hide: boolean): void

Parameters:

NameType
hideboolean

Returns: void


setHeaderLabel

setHeaderLabel(label: string): void

Sets the header label.

Parameters:

NameTypeDescription
labelstringThe header label.

Returns: void


setHeaderLabels

setHeaderLabels(labels: string[]): void

Sets the header labels of the existing columns.

Parameters:

NameTypeDescription
labelsstring[]The header labels for each column.

Returns: void


setHorizontalScrollBar

setHorizontalScrollBar(scrollBar: QScrollBar): void

Inherited from QAbstractScrollArea.setHorizontalScrollBar

Parameters:

NameType
scrollBarQScrollBar

Returns: void


setHorizontalScrollBarPolicy

setHorizontalScrollBarPolicy(policy: ScrollBarPolicy): void

Inherited from QAbstractScrollArea.setHorizontalScrollBarPolicy

Parameters:

NameType
policyScrollBarPolicy

Returns: void


setInlineStyle

setInlineStyle(style: string): void

Inherited from QMenu.setInlineStyle

Parameters:

NameType
stylestring

Returns: void


setItemWidget

setItemWidget(item: QTreeWidgetItem, column: number, widget: QWidget): void

Sets the given widget to be displayed in the cell specified by the given item and column.

Parameters:

NameTypeDescription
itemQTreeWidgetItemThe targeted item.
columnnumberThe column in which to show the edit widget.
widgetQWidgetThe edit widget.

Returns: void


setLayout

setLayout(parentLayout: NodeLayoutQTreeWidgetSignals›): void

Inherited from QMenu.setLayout

Parameters:

NameType
parentLayoutNodeLayoutQTreeWidgetSignals

Returns: void


setLineWidth

setLineWidth(width: number): void

Inherited from NodeFrame.setLineWidth

Parameters:

NameType
widthnumber

Returns: void


setMaximumSize

setMaximumSize(maxw: number, maxh: number): void

Inherited from QMenu.setMaximumSize

Parameters:

NameType
maxwnumber
maxhnumber

Returns: void


setMidLineWidth

setMidLineWidth(width: number): void

Inherited from NodeFrame.setMidLineWidth

Parameters:

NameType
widthnumber

Returns: void


setMinimumSize

setMinimumSize(minw: number, minh: number): void

Inherited from QMenu.setMinimumSize

Parameters:

NameType
minwnumber
minhnumber

Returns: void


setMouseTracking

setMouseTracking(isMouseTracked: boolean): void

Inherited from QMenu.setMouseTracking

Parameters:

NameType
isMouseTrackedboolean

Returns: void


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

NameType
parent?Component

Returns: void


setObjectName

setObjectName(objectName: string): void

Inherited from QMenu.setObjectName

Overrides NodeObject.setObjectName

Parameters:

NameType
objectNamestring

Returns: void


setProperty

setProperty(name: string, value: QVariantType): boolean

Inherited from NodeObject.setProperty

Parameters:

NameType
namestring
valueQVariantType

Returns: boolean


setSortingEnabled

setSortingEnabled(enable: boolean): void

Sets if columns can be sorted by clicking on its header

Parameters:

NameTypeDescription
enablebooleanSorting enabled or disabled

Returns: void


setStyleSheet

setStyleSheet(styleSheet: string): void

Inherited from QMenu.setStyleSheet

Parameters:

NameType
styleSheetstring

Returns: void


setVerticalScrollBar

setVerticalScrollBar(scrollBar: QScrollBar): void

Inherited from QAbstractScrollArea.setVerticalScrollBar

Parameters:

NameType
scrollBarQScrollBar

Returns: void


setVerticalScrollBarPolicy

setVerticalScrollBarPolicy(policy: ScrollBarPolicy): void

Inherited from QAbstractScrollArea.setVerticalScrollBarPolicy

Parameters:

NameType
policyScrollBarPolicy

Returns: void


setViewport

setViewport(widget: NodeWidget‹any›): void

Inherited from QAbstractScrollArea.setViewport

Parameters:

NameType
widgetNodeWidget‹any›

Returns: void


setWindowFlag

setWindowFlag(windowType: WindowType, switchOn: boolean): void

Inherited from QMenu.setWindowFlag

Parameters:

NameType
windowTypeWindowType
switchOnboolean

Returns: void


setWindowIcon

setWindowIcon(icon: QIcon): void

Inherited from QMenu.setWindowIcon

Parameters:

NameType
iconQIcon

Returns: void


setWindowOpacity

setWindowOpacity(opacity: number): void

Inherited from QMenu.setWindowOpacity

Parameters:

NameType
opacitynumber

Returns: void


setWindowState

setWindowState(state: WindowState): void

Inherited from QMenu.setWindowState

Parameters:

NameType
stateWindowState

Returns: void


setWindowTitle

setWindowTitle(title: string): void

Inherited from QMenu.setWindowTitle

Parameters:

NameType
titlestring

Returns: void


show

show(): void

Inherited from QMenu.show

Returns: void


showFullScreen

showFullScreen(): void

Inherited from QMenu.showFullScreen

Returns: void


showMaximized

showMaximized(): void

Inherited from QMenu.showMaximized

Returns: void


showMinimized

showMinimized(): void

Inherited from QMenu.showMinimized

Returns: void


showNormal

showNormal(): void

Inherited from QMenu.showNormal

Returns: void


size

size(): QSize

Inherited from QMenu.size

Returns: QSize


styleSheet

styleSheet(): string

Inherited from QMenu.styleSheet

Returns: string


takeTopLevelItem

takeTopLevelItem(index: number): QTreeWidgetItem | void

Parameters:

NameType
indexnumber

Returns: QTreeWidgetItem | void


testAttribute

testAttribute(attribute: WidgetAttribute): boolean

Inherited from QMenu.testAttribute

Parameters:

NameType
attributeWidgetAttribute

Returns: boolean


update

update(): void

Inherited from QMenu.update

Returns: void


updateGeometry

updateGeometry(): void

Inherited from QMenu.updateGeometry

Returns: void


viewport

viewport(): QWidget

Inherited from QAbstractScrollArea.viewport

Returns: QWidget


windowOpacity

windowOpacity(): number

Inherited from QMenu.windowOpacity

Returns: number


windowState

windowState(): number

Inherited from QMenu.windowState

Returns: number


windowTitle

windowTitle(): string

Inherited from QMenu.windowTitle

Returns: string