Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Unknown macro: {alias}

Name

qdelete — delete object

Syntax

qdelete [widget]

qdelete [treeitem]

qdelete [tableitem]

Description

The qdelete deletes an widget or item from memory. Any children the widget may have are also deleted. If the object is drawn on the screen it will be erased.

To make a widget invisible without deleting it use the qclose command. Many applications do not need qdelete, but rely on qshow, qclose, and qraise to manage visibility/invisibility issues.

Arguments

widget

treeitem

tableitem

Examples

Ex.1: Delete

set w1 [qwidget ]
qsetwindowtitle "Window 1"

set w2 [qwidget]
qsetwindowtitle "Window 2"

set layout [qvboxlayout $w1]
set button [qpushbutton "Delete W2" { qdelete $w2 } ]
qaddwidget $layout $button

qshow $w1
qshow $w2

The above script creates two windows - pressing the button will delete the windows titled "Window 2".

  • No labels