PySide6.QtQuickWidgets

Detailed Description

Provides a widget class for displaying a Qt Quick user interface.

The Qt Quick Widgets module is a convenience wrapper for QQuickWindow . It will automatically load and display a QML scene when given the URL of the main qml file. Alternatively, you can instantiate QML objects using QQmlComponent and place them in a manually set-up QQuickWidget .

Typical usage:

view = QQuickWidget()
view.setSource(QUrl.fromLocalFile("myqmlfile.qml"))
view.show()

QQuickWidget also manages resizing the view and the root item. By default, the resizeMode() is set to QQuickWidget.ResizeMode.SizeViewToRootObject , which will load the component and resize it to fit the view. Alternatively, you can set resizeMode() to QQuickWidget.ResizeMode.SizeViewToRootObject, which will resize the view to the root item.

List of QML types

List of Classes