Dialog (hwx.gui)

A top-level window mostly used for short-term tasks and brief communications with the user.

Inherits:

Properties

Public Methods

accept (self, returnValue)
addChildren (self, children)
createContents (self)
exec (self)
positionUnder (self, relativeTo, checkWasMoved=True, xoffset=0)
reject (self)
show (self)

Property Details

The text displayed in the titlebar.

The location within the main window.

Method Details

accept(self, returnValue)

Close the dialog and returnValue from exec.

addChildren(self, children)

Adds widgets to the container.

param children:The widget or list of widgets to be added.
type children:list[Widget]
createContents(self)

To be implemented in derived class.

exec(self)

Show as a model dialog, blocking code execution until it is closed.

This is typically used to get user input before continuing. Dialog code returns the input from exec by calling self.accept(value).

returns:The accepted value or None if the dialog is closed in any other way.
positionUnder(self, relativeTo, checkWasMoved=True, xoffset=0)

Positions the dialog under or over the relataveTo widget.

param relativeTo:
 The widget to position relative to.
type relativeTo:
 Widget
param checkWasMoved:
 Determines whether to check if widget is moved or not.
type checkWasMoved:
 bool
param xoffset:The offset value for the widget for x-axis.
type xoffset:int
reject(self)

Syntactic sugar to close the exec dialog without accepting a value. None is returned from exec.

show(self)

Shows the dialog and continues with script execution.