Stacked Widget (stackedwidget)

AnimatedStackedWidget

A widget similar to QStackedWidget supporting animated transitions between widgets.

class orangecanvas.gui.stackedwidget.AnimatedStackedWidget(parent=None, animationEnabled=True)[source]

Bases: QFrame

currentChanged(int)

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

Current widget has changed

transitionStarted

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

Transition animation has started

transitionFinished

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

Transition animation has finished

setAnimationEnabled(animationEnabled)[source]

Enable/disable transition animations.

animationEnabled()[source]

Is the transition animation enabled.

addWidget(widget)[source]

Append the widget to the stack and return its index.

insertWidget(index, widget)[source]

Insert widget into the stack at index.

removeWidget(widget)[source]

Remove widget from the stack.

Note

The widget is hidden but is not deleted.

widget(index)[source]

Return the widget at index

indexOf(widget)[source]

Return the index of widget in the stack.

count()[source]

Return the number of widgets in the stack.

setCurrentWidget(widget)[source]

Set the current shown widget.

setCurrentIndex(index)[source]

Set the current shown widget index.

currentIndex()[source]

Return the current shown widget index.

sizeHint(self) QSize[source]
class orangecanvas.gui.stackedwidget.StackLayout(parent: QWidget | QLayout | None = None, **kwargs: Any)[source]

Bases: QStackedLayout

A stacked layout with sizeHint always the same as that of the current widget.

sizeHint(self) QSize[source]
minimumSize(self) QSize[source]
maximumSize(self) QSize[source]
hasHeightForWidth(self) bool[source]
heightForWidth(self, width: int) int[source]
geometry(self) QRect[source]
setGeometry(self, rect: QRect)[source]
addWidget(self, w: QWidget | None) int[source]