QDesignerFormWindowCursorInterface

The QDesignerFormWindowCursorInterface class allows you to query and modify a form window’s widget selection, and in addition modify the properties of all the form’s widgets. More

Inheritance diagram of PySide6.QtDesigner.QDesignerFormWindowCursorInterface

Synopsis

Functions

Virtual functions

Detailed Description

QDesignerFormWindowCursorInterface is a convenience class that provides an interface to the associated form window’s text cursor; it provides a collection of functions that enables you to query a given form window’s selection and change the selection’s focus according to defined modes ( MoveMode ) and movements ( MoveOperation ). You can also use the interface to query the form’s widgets and change their properties.

The interface is not intended to be instantiated directly, but to provide access to the selections and widgets of Qt Designer’s current form windows. QDesignerFormWindowInterface always provides an associated cursor interface. The form window for a given widget can be retrieved using the static functions. For example:

QDesignerFormWindowInterface *formWindow = 0;
formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget);

formWindow->cursor()->setProperty(myWidget, myProperty, newValue);

You can retrieve any of Qt Designer’s current form windows through Qt Designer’s form window manager .

Once you have a form window’s cursor interface, you can check if the form window has a selection at all using the function. You can query the form window for its total and . You can retrieve the currently selected widget (or widgets) using the or functions.

You can retrieve any of the form window’s widgets using the function, and check if a widget is selected using the isWidgetSelected() function. You can use the function to set the selected widget’s properties, and the or functions to modify the properties of any given widget.

Finally, you can change the selection by changing the text cursor’s using the and functions.

class PySide6.QtDesigner.QDesignerFormWindowCursorInterface
PySide6.QtDesigner.QDesignerFormWindowCursorInterface.MoveOperation

This enum describes the types of text cursor operation that can occur in a form window.

Constant

Description

QDesignerFormWindowCursorInterface.NoMove

The cursor does not move.

QDesignerFormWindowCursorInterface.Start

Moves the cursor to the start of the focus chain.

QDesignerFormWindowCursorInterface.End

Moves the cursor to the end of the focus chain.

QDesignerFormWindowCursorInterface.Next

Moves the cursor to the next widget in the focus chain.

QDesignerFormWindowCursorInterface.Prev

Moves the cursor to the previous widget in the focus chain.

QDesignerFormWindowCursorInterface.Left

The cursor moves to the left.

QDesignerFormWindowCursorInterface.Right

The cursor moves to the right.

QDesignerFormWindowCursorInterface.Up

The cursor moves upwards.

QDesignerFormWindowCursorInterface.Down

The cursor moves downwards.

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.MoveMode

This enum describes the different modes that are used when the text cursor moves.

Constant

Description

QDesignerFormWindowCursorInterface.MoveAnchor

The anchor moves with the cursor to its new location.

QDesignerFormWindowCursorInterface.KeepAnchor

The anchor remains at the cursor’s old location.

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.current()
Return type

PySide6.QtWidgets.QWidget

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.formWindow()
Return type

PySide6.QtDesigner.QDesignerFormWindowInterface

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.hasSelection()
Return type

bool

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.isWidgetSelected(widget)
Parameters

widgetPySide6.QtWidgets.QWidget

Return type

bool

Returns true if the specified widget is selected; otherwise returns false.

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.movePosition(op[, mode=MoveAnchor])
Parameters
Return type

bool

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.position()
Return type

int

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.resetWidgetProperty(widget, name)
Parameters
PySide6.QtDesigner.QDesignerFormWindowCursorInterface.selectedWidget(index)
Parameters

index – int

Return type

PySide6.QtWidgets.QWidget

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.selectedWidgetCount()
Return type

int

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.setPosition(pos[, mode=MoveAnchor])
Parameters
PySide6.QtDesigner.QDesignerFormWindowCursorInterface.setProperty(name, value)
Parameters
  • name – str

  • value – object

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.setWidgetProperty(widget, name, value)
Parameters
PySide6.QtDesigner.QDesignerFormWindowCursorInterface.widget(index)
Parameters

index – int

Return type

PySide6.QtWidgets.QWidget

PySide6.QtDesigner.QDesignerFormWindowCursorInterface.widgetCount()
Return type

int