Contents Menu Expand Light mode Dark mode Auto light/dark mode
Qt for Python
Logo
Qt for Python
  • Quick start
  • Getting Started
    • Getting Started on Linux
    • Getting Started on macOS
    • Getting Started on Windows
    • Package Details
    • Porting Applications from PySide2 to PySide6
  • Modules API
    • Qt Modules Supported by Qt for Python
      • PySide6.Qt3DAnimation
        • QAbstractAnimation
        • QAbstractAnimationClip
        • QAbstractChannelMapping
        • QAbstractClipAnimator
        • QAbstractClipBlendNode
        • QAdditiveClipBlend
        • QAnimationAspect
        • QAnimationCallback
        • QAnimationClip
        • QAnimationClipData
        • QAnimationClipLoader
        • QAnimationController
        • QAnimationGroup
        • QBlendedClipAnimator
        • QChannel
        • QChannelComponent
        • QChannelMapper
        • QChannelMapping
        • QClipAnimator
        • QClipBlendValue
        • QClock
        • QKeyFrame
        • QKeyframeAnimation
        • QLerpClipBlend
        • QMorphTarget
        • QMorphingAnimation
        • QSkeletonMapping
        • QVertexBlendAnimation
        • Qt3DAnimation
      • PySide6.Qt3DCore
        • QAbstractAspect
        • QAbstractFunctor
        • QAbstractSkeleton
        • QArmature
        • QAspectEngine
        • QAspectJob
        • QAttribute
        • QBackendNode
        • QBackendNodeMapper
        • QBoundingVolume
        • QBuffer
        • QComponent
        • QCoreSettings
        • QEntity
        • QGeometry
        • QGeometryView
        • QJoint
        • QNode
        • QNodeId
        • QNodeIdTypePair
        • QSkeleton
        • QSkeletonLoader
        • QTransform
        • Qt3DCore
      • PySide6.Qt3DExtras
        • InputState
        • QAbstractCameraController
        • QAbstractSpriteSheet
        • QConeGeometry
        • QConeGeometryView
        • QConeMesh
        • QCuboidGeometry
        • QCuboidGeometryView
        • QCuboidMesh
        • QCylinderGeometry
        • QCylinderGeometryView
        • QCylinderMesh
        • QDiffuseMapMaterial
        • QDiffuseSpecularMapMaterial
        • QDiffuseSpecularMaterial
        • QExtrudedTextGeometry
        • QExtrudedTextMesh
        • QFirstPersonCameraController
        • QForwardRenderer
        • QGoochMaterial
        • QMetalRoughMaterial
        • QMorphPhongMaterial
        • QNormalDiffuseMapAlphaMaterial
        • QNormalDiffuseMapMaterial
        • QNormalDiffuseSpecularMapMaterial
        • QOrbitCameraController
        • QPerVertexColorMaterial
        • QPhongAlphaMaterial
        • QPhongMaterial
        • QPlaneGeometry
        • QPlaneGeometryView
        • QPlaneMesh
        • QSkyboxEntity
        • QSphereGeometry
        • QSphereGeometryView
        • QSphereMesh
        • QSpriteGrid
        • QSpriteSheet
        • QSpriteSheetItem
        • QText2DEntity
        • QTextureMaterial
        • QTorusGeometry
        • QTorusGeometryView
        • QTorusMesh
        • Qt3DExtras
        • Qt3DWindow
      • PySide6.Qt3DInput
        • QAbstractActionInput
        • QAbstractAxisInput
        • QAbstractPhysicalDevice
        • QAction
        • QActionInput
        • QAnalogAxisInput
        • QAxis
        • QAxisAccumulator
        • QAxisSetting
        • QButtonAxisInput
        • QInputAspect
        • QInputChord
        • QInputSequence
        • QInputSettings
        • QKeyEvent
        • QKeyboardDevice
        • QKeyboardHandler
        • QLogicalDevice
        • QMouseDevice
        • QMouseEvent
        • QMouseHandler
        • QWheelEvent
        • Qt3DInput
      • PySide6.Qt3DLogic
        • QFrameAction
        • QLogicAspect
        • Qt3DLogic
      • PySide6.Qt3DRender
        • PropertyReaderInterface
        • QAbstractLight
        • QAbstractRayCaster
        • QAbstractTexture
        • QAbstractTextureImage
        • QAlphaCoverage
        • QAlphaTest
        • QBlendEquation
        • QBlendEquationArguments
        • QBlitFramebuffer
        • QBufferCapture
        • QCamera
        • QCameraLens
        • QCameraSelector
        • QClearBuffers
        • QClipPlane
        • QColorMask
        • QComputeCommand
        • QCullFace
        • QDepthRange
        • QDepthTest
        • QDirectionalLight
        • QDispatchCompute
        • QDithering
        • QEffect
        • QEnvironmentLight
        • QFilterKey
        • QFrameGraphNode
        • QFrontFace
        • QFrustumCulling
        • QGeometryRenderer
        • QGraphicsApiFilter
        • QLayer
        • QLayerFilter
        • QLevelOfDetail
        • QLevelOfDetailBoundingSphere
        • QLevelOfDetailSwitch
        • QLineWidth
        • QMaterial
        • QMemoryBarrier
        • QMesh
        • QMultiSampleAntiAliasing
        • QNoDepthMask
        • QNoDraw
        • QNoPicking
        • QObjectPicker
        • QPaintedTextureImage
        • QParameter
        • QPickEvent
        • QPickLineEvent
        • QPickPointEvent
        • QPickTriangleEvent
        • QPickingProxy
        • QPickingSettings
        • QPointLight
        • QPointSize
        • QPolygonOffset
        • QProximityFilter
        • QRasterMode
        • QRayCaster
        • QRayCasterHit
        • QRenderAspect
        • QRenderCapabilities
        • QRenderCapture
        • QRenderCaptureReply
        • QRenderPass
        • QRenderPassFilter
        • QRenderSettings
        • QRenderState
        • QRenderStateSet
        • QRenderSurfaceSelector
        • QRenderTarget
        • QRenderTargetOutput
        • QRenderTargetSelector
        • QSceneLoader
        • QScissorTest
        • QScreenRayCaster
        • QSeamlessCubemap
        • QSetFence
        • QShaderData
        • QShaderImage
        • QShaderProgram
        • QShaderProgramBuilder
        • QSharedGLTexture
        • QSortPolicy
        • QSpotLight
        • QStencilMask
        • QStencilOperation
        • QStencilOperationArguments
        • QStencilTest
        • QStencilTestArguments
        • QSubtreeEnabler
        • QTechnique
        • QTechniqueFilter
        • QTexture1D
        • QTexture1DArray
        • QTexture2D
        • QTexture2DArray
        • QTexture2DMultisample
        • QTexture2DMultisampleArray
        • QTexture3D
        • QTextureBuffer
        • QTextureCubeMap
        • QTextureCubeMapArray
        • QTextureData
        • QTextureDataUpdate
        • QTextureImage
        • QTextureImageData
        • QTextureImageDataGenerator
        • QTextureLoader
        • QTextureRectangle
        • QTextureWrapMode
        • QViewport
        • QWaitFence
        • Qt3DRender
      • PySide6.QtBluetooth
        • AddressInfo
        • Alternative
        • QBluetooth
        • QBluetoothAddress
        • QBluetoothDeviceDiscoveryAgent
        • QBluetoothDeviceInfo
        • QBluetoothHostInfo
        • QBluetoothLocalDevice
        • QBluetoothServer
        • QBluetoothServiceDiscoveryAgent
        • QBluetoothServiceInfo
        • QBluetoothSocket
        • QBluetoothUuid
        • QLowEnergyAdvertisingData
        • QLowEnergyAdvertisingParameters
        • QLowEnergyCharacteristic
        • QLowEnergyCharacteristicData
        • QLowEnergyConnectionParameters
        • QLowEnergyController
        • QLowEnergyDescriptor
        • QLowEnergyDescriptorData
        • QLowEnergyService
        • QLowEnergyServiceData
        • Sequence
      • PySide6.QtCharts
        • QAbstractAxis
        • QAbstractBarSeries
        • QAbstractSeries
        • QAreaLegendMarker
        • QAreaSeries
        • QBarCategoryAxis
        • QBarLegendMarker
        • QBarModelMapper
        • QBarSeries
        • QBarSet
        • QBoxPlotLegendMarker
        • QBoxPlotModelMapper
        • QBoxPlotSeries
        • QBoxSet
        • QCandlestickLegendMarker
        • QCandlestickModelMapper
        • QCandlestickSeries
        • QCandlestickSet
        • QCategoryAxis
        • QChart
        • QChartView
        • QDateTimeAxis
        • QHBarModelMapper
        • QHBoxPlotModelMapper
        • QHCandlestickModelMapper
        • QHPieModelMapper
        • QHXYModelMapper
        • QHorizontalBarSeries
        • QHorizontalPercentBarSeries
        • QHorizontalStackedBarSeries
        • QLegend
        • QLegendMarker
        • QLineSeries
        • QLogValueAxis
        • QPercentBarSeries
        • QPieLegendMarker
        • QPieModelMapper
        • QPieSeries
        • QPieSlice
        • QPolarChart
        • QScatterSeries
        • QSplineSeries
        • QStackedBarSeries
        • QVBarModelMapper
        • QVBoxPlotModelMapper
        • QVCandlestickModelMapper
        • QVPieModelMapper
        • QVXYModelMapper
        • QValueAxis
        • QXYLegendMarker
        • QXYModelMapper
        • QXYSeries
      • PySide6.QtCoap
        • QCoapClient
        • QCoapMessage
        • QCoapOption
        • QCoapPrivateKey
        • QCoapReply
        • QCoapRequest
        • QCoapResource
        • QCoapResourceDiscoveryReply
        • QCoapSecurityConfiguration
        • QtCoap
      • PySide6.QtConcurrent
        • QFutureQString
        • QFutureVoid
        • QFutureWatcherQString
        • QFutureWatcherVoid
        • QtConcurrent
      • PySide6.QtCore
        • Connection
        • FromBase64Result
        • OffsetData
        • QAbstractAnimation
        • QAbstractEventDispatcher
        • QAbstractItemModel
        • QAbstractListModel
        • QAbstractNativeEventFilter
        • QAbstractProxyModel
        • QAbstractTableModel
        • QAnimationGroup
        • QBasicMutex
        • QBasicTimer
        • QBitArray
        • QBuffer
        • QByteArray
        • QByteArrayMatcher
        • QCalendar
        • QCborArray
        • QCborError
        • QCborMap
        • QCborParserError
        • QCborStreamReader
        • QCborStreamWriter
        • QCborStringResultByteArray
        • QCborStringResultString
        • QCborValue
        • QChildEvent
        • QCollator
        • QCollatorSortKey
        • QCommandLineOption
        • QCommandLineParser
        • QConcatenateTablesProxyModel
        • QCoreApplication
        • QCryptographicHash
        • QDataStream
        • QDate
        • QDateTime
        • QDeadlineTimer
        • QDir
        • QDirIterator
        • QDynamicPropertyChangeEvent
        • QEasingCurve
        • QElapsedTimer
        • QEvent
        • QEventLoop
        • QFactoryInterface
        • QFile
        • QFileDevice
        • QFileInfo
        • QFileSelector
        • QFileSystemWatcher
        • QFutureInterfaceBase
        • QGenericArgument
        • QGenericReturnArgument
        • QIODevice
        • QIODeviceBase
        • QIdentityProxyModel
        • QItemSelection
        • QItemSelectionModel
        • QItemSelectionRange
        • QJsonArray
        • QJsonDocument
        • QJsonParseError
        • QJsonValue
        • QKeyCombination
        • QLibrary
        • QLibraryInfo
        • QLine
        • QLineF
        • QLocale
        • QLockFile
        • QLoggingCategory
        • QMargins
        • QMarginsF
        • QMessageAuthenticationCode
        • QMessageLogContext
        • QMetaClassInfo
        • QMetaEnum
        • QMetaMethod
        • QMetaObject
        • QMetaProperty
        • QMetaType
        • QMimeData
        • QMimeDatabase
        • QMimeType
        • QModelIndex
        • QModelRoleData
        • QMutex
        • QObject
        • QOperatingSystemVersion
        • QOperatingSystemVersionBase
        • QParallelAnimationGroup
        • QPauseAnimation
        • QPersistentModelIndex
        • QPluginLoader
        • QPoint
        • QPointF
        • QProcess
        • QProcessEnvironment
        • QPropertyAnimation
        • QRandomGenerator
        • QRandomGenerator64
        • QReadLocker
        • QReadWriteLock
        • QRect
        • QRectF
        • QRecursiveMutex
        • QRegularExpression
        • QRegularExpressionMatch
        • QRegularExpressionMatchIterator
        • QResource
        • QRunnable
        • QSaveFile
        • QSemaphore
        • QSemaphoreReleaser
        • QSequentialAnimationGroup
        • QSettings
        • QSharedMemory
        • QSignalBlocker
        • QSignalMapper
        • QSize
        • QSizeF
        • QSocketDescriptor
        • QSocketNotifier
        • QSortFilterProxyModel
        • QStandardPaths
        • QStorageInfo
        • QStringConverter
        • QStringConverterBase
        • QStringDecoder
        • QStringEncoder
        • QStringListModel
        • QSysInfo
        • QSystemSemaphore
        • QTemporaryDir
        • QTemporaryFile
        • QTextBoundaryFinder
        • QTextStream
        • QTextStreamManipulator
        • QThread
        • QThreadPool
        • QTime
        • QTimeLine
        • QTimeZone
        • QTimer
        • QTimerEvent
        • QTranslator
        • QTransposeProxyModel
        • QUrl
        • QUrlQuery
        • QUuid
        • QVariantAnimation
        • QVersionNumber
        • QWaitCondition
        • QWriteLocker
        • QXmlStreamAttribute
        • QXmlStreamAttributes
        • QXmlStreamEntityDeclaration
        • QXmlStreamEntityResolver
        • QXmlStreamNamespaceDeclaration
        • QXmlStreamNotationDeclaration
        • QXmlStreamReader
        • QXmlStreamWriter
        • Qt
        • State
        • SystemId
        • TimerInfo
        • YearMonthDay
        • ClassInfo
        • Property
        • QEnum/QFlag
        • Signal
        • Slot
      • PySide6.QtDBus
        • QDBus
        • QDBusAbstractAdaptor
        • QDBusAbstractInterface
        • QDBusAbstractInterfaceBase
        • QDBusArgument
        • QDBusConnection
        • QDBusConnectionInterface
        • QDBusContext
        • QDBusError
        • QDBusInterface
        • QDBusMessage
        • QDBusObjectPath
        • QDBusPendingCall
        • QDBusPendingCallWatcher
        • QDBusServer
        • QDBusServiceWatcher
        • QDBusSignature
        • QDBusUnixFileDescriptor
        • QDBusVariant
        • QDBusVirtualObject
      • PySide6.QtDataVisualization
        • Q3DBars
        • Q3DCamera
        • Q3DInputHandler
        • Q3DLight
        • Q3DObject
        • Q3DScatter
        • Q3DScene
        • Q3DSurface
        • Q3DTheme
        • QAbstract3DAxis
        • QAbstract3DGraph
        • QAbstract3DInputHandler
        • QAbstract3DSeries
        • QAbstractDataProxy
        • QBar3DSeries
        • QBarDataItem
        • QBarDataProxy
        • QCategory3DAxis
        • QCustom3DItem
        • QCustom3DLabel
        • QCustom3DVolume
        • QHeightMapSurfaceDataProxy
        • QItemModelBarDataProxy
        • QItemModelScatterDataProxy
        • QItemModelSurfaceDataProxy
        • QLogValue3DAxisFormatter
        • QScatter3DSeries
        • QScatterDataItem
        • QScatterDataProxy
        • QSurface3DSeries
        • QSurfaceDataItem
        • QSurfaceDataProxy
        • QTouch3DInputHandler
        • QValue3DAxis
        • QValue3DAxisFormatter
      • PySide6.QtDesigner
        • Category
        • QAbstractExtensionFactory
        • QAbstractExtensionManager
        • QAbstractFormBuilder
        • QDesignerActionEditorInterface
        • QDesignerContainerExtension
        • QDesignerCustomWidgetCollectionInterface
        • QDesignerCustomWidgetInterface
        • QDesignerDnDItemInterface
        • QDesignerDynamicPropertySheetExtension
        • QDesignerFormEditorInterface
        • QDesignerFormWindowCursorInterface
        • QDesignerFormWindowInterface
        • QDesignerFormWindowManagerInterface
        • QDesignerFormWindowToolInterface
        • QDesignerMemberSheetExtension
        • QDesignerObjectInspectorInterface
        • QDesignerPropertyEditorInterface
        • QDesignerPropertySheetExtension
        • QDesignerTaskMenuExtension
        • QDesignerWidgetBoxInterface
        • QExtensionManager
        • QFormBuilder
        • Widget
        • QPyDesignerContainerExtension
        • QPyDesignerCustomWidgetCollection
        • QPyDesignerMemberSheetExtension
        • QPyDesignerTaskMenuExtension
      • PySide6.QtGui
        • Attribute
        • Element
        • FormatRange
        • Key
        • PaintContext
        • PixmapFragment
        • QAbstractFileIconProvider
        • QAbstractTextDocumentLayout
        • QAccessible
        • QAccessibleActionInterface
        • QAccessibleEditableTextInterface
        • QAccessibleEvent
        • QAccessibleInterface
        • QAccessibleObject
        • QAccessibleStateChangeEvent
        • QAccessibleTableCellInterface
        • QAccessibleTableModelChangeEvent
        • QAccessibleTextCursorEvent
        • QAccessibleTextInsertEvent
        • QAccessibleTextInterface
        • QAccessibleTextRemoveEvent
        • QAccessibleTextSelectionEvent
        • QAccessibleTextUpdateEvent
        • QAccessibleValueChangeEvent
        • QAccessibleValueInterface
        • QAction
        • QActionEvent
        • QActionGroup
        • QBackingStore
        • QBitmap
        • QBrush
        • QClipboard
        • QCloseEvent
        • QColor
        • QColorConstants
        • QColorSpace
        • QColorTransform
        • QConicalGradient
        • QContextMenuEvent
        • QCursor
        • QDesktopServices
        • QDoubleValidator
        • QDrag
        • QDragEnterEvent
        • QDragLeaveEvent
        • QDragMoveEvent
        • QDropEvent
        • QEnterEvent
        • QEventPoint
        • QExposeEvent
        • QFileOpenEvent
        • QFocusEvent
        • QFont
        • QFontDatabase
        • QFontInfo
        • QFontMetrics
        • QFontMetricsF
        • QGlyphRun
        • QGradient
        • QGuiApplication
        • QHelpEvent
        • QHideEvent
        • QHoverEvent
        • QIcon
        • QIconDragEvent
        • QIconEngine
        • QImage
        • QImageIOHandler
        • QImageReader
        • QImageWriter
        • QInputDevice
        • QInputEvent
        • QInputMethod
        • QInputMethodEvent
        • QInputMethodQueryEvent
        • QIntValidator
        • QKeyEvent
        • QKeySequence
        • QLinearGradient
        • QMatrix2x2
        • QMatrix2x3
        • QMatrix2x4
        • QMatrix3x2
        • QMatrix3x3
        • QMatrix3x4
        • QMatrix4x2
        • QMatrix4x3
        • QMatrix4x4
        • QMouseEvent
        • QMoveEvent
        • QMovie
        • QNativeGestureEvent
        • QOffscreenSurface
        • QOpenGLContext
        • QOpenGLContextGroup
        • QOpenGLExtraFunctions
        • QOpenGLFunctions
        • QPageLayout
        • QPageRanges
        • QPageSize
        • QPagedPaintDevice
        • QPaintDevice
        • QPaintDeviceWindow
        • QPaintEngine
        • QPaintEngineState
        • QPaintEvent
        • QPainter
        • QPainterPath
        • QPainterPathStroker
        • QPalette
        • QPdfWriter
        • QPen
        • QPicture
        • QPixelFormat
        • QPixmap
        • QPixmapCache
        • QPlatformSurfaceEvent
        • QPointerEvent
        • QPointingDevice
        • QPointingDeviceUniqueId
        • QPolygon
        • QPolygonF
        • QQuaternion
        • QRadialGradient
        • QRasterWindow
        • QRawFont
        • QRegion
        • QRegularExpressionValidator
        • QResizeEvent
        • QRgba64
        • QScreen
        • QScrollEvent
        • QScrollPrepareEvent
        • QSessionManager
        • QShortcut
        • QShortcutEvent
        • QShowEvent
        • QSinglePointEvent
        • QStandardItem
        • QStandardItemModel
        • QStaticText
        • QStatusTipEvent
        • QStyleHints
        • QSurface
        • QSurfaceFormat
        • QSyntaxHighlighter
        • QTabletEvent
        • QTextBlock
        • QTextBlockFormat
        • QTextBlockGroup
        • QTextBlockUserData
        • QTextCharFormat
        • QTextCursor
        • QTextDocument
        • QTextDocumentFragment
        • QTextDocumentWriter
        • QTextFormat
        • QTextFragment
        • QTextFrame
        • QTextFrameFormat
        • QTextImageFormat
        • QTextInlineObject
        • QTextItem
        • QTextLayout
        • QTextLength
        • QTextLine
        • QTextList
        • QTextListFormat
        • QTextObject
        • QTextObjectInterface
        • QTextOption
        • QTextTable
        • QTextTableCell
        • QTextTableCellFormat
        • QTextTableFormat
        • QToolBarChangeEvent
        • QTouchEvent
        • QTransform
        • QUndoCommand
        • QUndoGroup
        • QUndoStack
        • QValidator
        • QVector2D
        • QVector3D
        • QVector4D
        • QWhatsThisClickedEvent
        • QWheelEvent
        • QWindow
        • QWindowStateChangeEvent
        • Qt
        • Range
        • ScaledPixmapArgument
        • Selection
        • State
        • Svg
        • Tab
        • iterator
        • iterator
      • PySide6.QtHelp
        • QCompressedHelpInfo
        • QHelpContentItem
        • QHelpContentModel
        • QHelpContentWidget
        • QHelpEngine
        • QHelpEngineCore
        • QHelpFilterData
        • QHelpFilterEngine
        • QHelpFilterSettingsWidget
        • QHelpIndexModel
        • QHelpIndexWidget
        • QHelpLink
        • QHelpSearchEngine
        • QHelpSearchQuery
        • QHelpSearchQueryWidget
        • QHelpSearchResult
        • QHelpSearchResultWidget
      • PySide6.QtHttpServer
        • QAbstractHttpServer
        • QFutureHttpServerResponse
        • QHttpServer
        • QHttpServerRequest
        • QHttpServerResponder
        • QHttpServerResponse
        • QHttpServerRouter
        • QHttpServerRouterRule
      • PySide6.QtMqtt
        • QMqtt
        • QMqttAuthenticationProperties
        • QMqttClient
        • QMqttConnectionProperties
        • QMqttLastWillProperties
        • QMqttMessage
        • QMqttMessageStatusProperties
        • QMqttPublishProperties
        • QMqttServerConnectionProperties
        • QMqttStringPair
        • QMqttSubscription
        • QMqttSubscriptionProperties
        • QMqttTopicFilter
        • QMqttTopicName
        • QMqttUnsubscriptionProperties
      • PySide6.QtMultimedia
        • Interval
        • QAudio
        • QAudioBuffer
        • QAudioDecoder
        • QAudioDevice
        • QAudioFormat
        • QAudioInput
        • QAudioOutput
        • QAudioSink
        • QAudioSource
        • QCamera
        • QCameraDevice
        • QCameraFormat
        • QImageCapture
        • QMediaCaptureSession
        • QMediaDevices
        • QMediaFormat
        • QMediaMetaData
        • QMediaPlayer
        • QMediaRecorder
        • QMediaTimeRange
        • QSoundEffect
        • QVideoFrame
        • QVideoFrameFormat
        • QVideoSink
      • PySide6.QtMultimediaWidgets
        • QGraphicsVideoItem
        • QVideoWidget
      • PySide6.QtNetwork
        • QAbstractNetworkCache
        • QAbstractSocket
        • QAuthenticator
        • QDnsDomainNameRecord
        • QDnsHostAddressRecord
        • QDnsLookup
        • QDnsMailExchangeRecord
        • QDnsServiceRecord
        • QDnsTextRecord
        • QDtls
        • QDtlsClientVerifier
        • QHostAddress
        • QHostInfo
        • QHstsPolicy
        • QHttp2Configuration
        • QHttpMultiPart
        • QHttpPart
        • QIPv6Address
        • QLocalServer
        • QLocalSocket
        • QNetworkAccessManager
        • QNetworkAddressEntry
        • QNetworkCacheMetaData
        • QNetworkCookie
        • QNetworkCookieJar
        • QNetworkDatagram
        • QNetworkDiskCache
        • QNetworkInformation
        • QNetworkInterface
        • QNetworkProxy
        • QNetworkProxyFactory
        • QNetworkProxyQuery
        • QNetworkReply
        • QNetworkRequest
        • QOcspResponse
        • QPasswordDigestor
        • QSsl
        • QSslCertificate
        • QSslCertificateExtension
        • QSslCipher
        • QSslConfiguration
        • QSslDiffieHellmanParameters
        • QSslEllipticCurve
        • QSslError
        • QSslKey
        • QSslPreSharedKeyAuthenticator
        • QSslServer
        • QSslSocket
        • QTcpServer
        • QTcpSocket
        • QUdpSocket
      • PySide6.QtNetworkAuth
        • QAbstractOAuth
        • QAbstractOAuth2
        • QAbstractOAuthReplyHandler
        • QOAuth1
        • QOAuth1Signature
        • QOAuth2AuthorizationCodeFlow
        • QOAuthHttpServerReplyHandler
        • QOAuthOobReplyHandler
      • PySide6.QtNfc
        • QNdefFilter
        • QNdefMessage
        • QNdefNfcIconRecord
        • QNdefNfcSmartPosterRecord
        • QNdefNfcTextRecord
        • QNdefNfcUriRecord
        • QNdefRecord
        • QNearFieldManager
        • QNearFieldTarget
        • Record
      • PySide6.QtOpcUa
        • DataChangeFilter
        • EventFilter
        • NodeIds
        • QOpcUa
        • QOpcUaAddNodeItem
        • QOpcUaAddReferenceItem
        • QOpcUaApplicationDescription
        • QOpcUaApplicationIdentity
        • QOpcUaArgument
        • QOpcUaAttributeOperand
        • QOpcUaAuthenticationInformation
        • QOpcUaAxisInformation
        • QOpcUaBinaryDataEncoding
        • QOpcUaBrowsePathTarget
        • QOpcUaBrowseRequest
        • QOpcUaClient
        • QOpcUaComplexNumber
        • QOpcUaContentFilterElement
        • QOpcUaContentFilterElementResult
        • QOpcUaDataValue
        • QOpcUaDeleteReferenceItem
        • QOpcUaDoubleComplexNumber
        • QOpcUaEUInformation
        • QOpcUaElementOperand
        • QOpcUaEndpointDescription
        • QOpcUaErrorState
        • QOpcUaEventFilterResult
        • QOpcUaExpandedNodeId
        • QOpcUaExtensionObject
        • QOpcUaHistoryData
        • QOpcUaHistoryReadRawRequest
        • QOpcUaHistoryReadResponse
        • QOpcUaLiteralOperand
        • QOpcUaLocalizedText
        • QOpcUaMonitoringParameters
        • QOpcUaMultiDimensionalArray
        • QOpcUaNode
        • QOpcUaNodeCreationAttributes
        • QOpcUaPkiConfiguration
        • QOpcUaProvider
        • QOpcUaQualifiedName
        • QOpcUaRange
        • QOpcUaReadItem
        • QOpcUaReadResult
        • QOpcUaReferenceDescription
        • QOpcUaRelativePathElement
        • QOpcUaSimpleAttributeOperand
        • QOpcUaUserTokenPolicy
        • QOpcUaWriteItem
        • QOpcUaWriteResult
        • QOpcUaXValue
      • PySide6.QtOpenGL
        • Binder
        • QAbstractOpenGLFunctions
        • QOpenGLBuffer
        • QOpenGLDebugLogger
        • QOpenGLDebugMessage
        • QOpenGLFramebufferObject
        • QOpenGLFramebufferObjectFormat
        • QOpenGLPaintDevice
        • QOpenGLPixelTransferOptions
        • QOpenGLShader
        • QOpenGLShaderProgram
        • QOpenGLTexture
        • QOpenGLTextureBlitter
        • QOpenGLTimeMonitor
        • QOpenGLTimerQuery
        • QOpenGLVersionFunctionsFactory
        • QOpenGLVersionProfile
        • QOpenGLVertexArrayObject
        • QOpenGLWindow
      • PySide6.QtOpenGLWidgets
        • QOpenGLWidget
      • PySide6.QtPdf
        • QPdfBookmarkModel
        • QPdfDocument
        • QPdfDocumentRenderOptions
        • QPdfLink
        • QPdfPageNavigator
        • QPdfPageRenderer
        • QPdfSearchModel
        • QPdfSelection
      • PySide6.QtPdfWidgets
        • QPdfView
      • PySide6.QtPositioning
        • QGeoAddress
        • QGeoAreaMonitorInfo
        • QGeoAreaMonitorSource
        • QGeoCircle
        • QGeoCoordinate
        • QGeoLocation
        • QGeoPath
        • QGeoPolygon
        • QGeoPositionInfo
        • QGeoPositionInfoSource
        • QGeoPositionInfoSourceFactory
        • QGeoRectangle
        • QGeoSatelliteInfo
        • QGeoSatelliteInfoSource
        • QGeoShape
        • QNmeaPositionInfoSource
      • PySide6.QtPrintSupport
        • QAbstractPrintDialog
        • QPageSetupDialog
        • QPrintDialog
        • QPrintEngine
        • QPrintPreviewDialog
        • QPrintPreviewWidget
        • QPrinter
        • QPrinterInfo
      • PySide6.QtQml
        • PropertyPair
        • QJSEngine
        • QJSManagedValue
        • QJSPrimitiveValue
        • QJSValue
        • QJSValueIterator
        • QQmlAbstractUrlInterceptor
        • QQmlApplicationEngine
        • QQmlComponent
        • QQmlContext
        • QQmlDebuggingEnabler
        • QQmlEngine
        • QQmlError
        • QQmlExpression
        • QQmlExtensionInterface
        • QQmlExtensionPlugin
        • QQmlFile
        • QQmlFileSelector
        • QQmlImageProviderBase
        • QQmlIncubationController
        • QQmlIncubator
        • QQmlListReference
        • QQmlNetworkAccessManagerFactory
        • QQmlParserStatus
        • QQmlProperty
        • QQmlPropertyMap
        • QQmlPropertyValueSource
        • QQmlScriptString
        • QQmlTypesExtensionInterface
        • QPyQmlParserStatus
        • QPyQmlPropertyValueSource
        • QmlAnonymous
        • QmlAttached
        • QmlElement
        • QmlExtended
        • QmlForeign
        • QmlNamedElement
        • QmlSingleton
        • QmlUncreatable
        • qmlRegisterSingletonInstance
        • qmlRegisterSingletonType
        • qmlRegisterType
        • qmlRegisterUncreatableType
      • PySide6.QtQuick
        • Attribute
        • AttributeSet
        • ColoredPoint2D
        • Point2D
        • QQuickAsyncImageProvider
        • QQuickFramebufferObject
        • QQuickGraphicsConfiguration
        • QQuickGraphicsDevice
        • QQuickImageProvider
        • QQuickImageResponse
        • QQuickItem
        • QQuickItemGrabResult
        • QQuickPaintedItem
        • QQuickRenderControl
        • QQuickRenderTarget
        • QQuickTextDocument
        • QQuickTextureFactory
        • QQuickTransform
        • QQuickView
        • QQuickWindow
        • QSGBasicGeometryNode
        • QSGClipNode
        • QSGDynamicTexture
        • QSGFlatColorMaterial
        • QSGGeometry
        • QSGGeometryNode
        • QSGMaterial
        • QSGMaterialShader
        • QSGMaterialType
        • QSGNode
        • QSGOpacityNode
        • QSGOpaqueTextureMaterial
        • QSGRectangleNode
        • QSGRenderNode
        • QSGRendererInterface
        • QSGSimpleRectNode
        • QSGSimpleTextureNode
        • QSGTexture
        • QSGTextureMaterial
        • QSGTextureProvider
        • QSGTransformNode
        • QSGVertexColorMaterial
        • RenderState
        • RenderState
        • Renderer
        • TexturedPoint2D
        • UpdatePaintNodeData
      • PySide6.QtQuick3D
        • Attribute
        • InstanceTableEntry
        • QQuick3D
        • QQuick3DGeometry
        • QQuick3DInstancing
        • QQuick3DObject
        • QQuick3DTextureData
      • PySide6.QtQuickControls2
        • QQuickStyle
      • PySide6.QtQuickWidgets
        • QQuickWidget
      • PySide6.QtRemoteObjects
        • QAbstractItemModelReplica
        • QRemoteObjectAbstractPersistedStore
        • QRemoteObjectDynamicReplica
        • QRemoteObjectHost
        • QRemoteObjectHostBase
        • QRemoteObjectNode
        • QRemoteObjectPendingCall
        • QRemoteObjectPendingCallWatcher
        • QRemoteObjectRegistry
        • QRemoteObjectRegistryHost
        • QRemoteObjectReplica
        • QRemoteObjectSettingsStore
        • QRemoteObjectSourceLocationInfo
      • PySide6.QtScxml
        • AssignmentInfo
        • EvaluatorInfo
        • ForeachInfo
        • ForeachLoopBody
        • InvokeInfo
        • Loader
        • ParameterInfo
        • QScxmlCompiler
        • QScxmlCppDataModel
        • QScxmlDataModel
        • QScxmlDynamicScxmlServiceFactory
        • QScxmlError
        • QScxmlEvent
        • QScxmlExecutableContent
        • QScxmlInvokableService
        • QScxmlInvokableServiceFactory
        • QScxmlNullDataModel
        • QScxmlStateMachine
        • QScxmlStaticScxmlServiceFactory
        • QScxmlTableData
      • PySide6.QtSensors
        • QAccelerometer
        • QAccelerometerFilter
        • QAccelerometerReading
        • QAmbientLightFilter
        • QAmbientLightReading
        • QAmbientLightSensor
        • QAmbientTemperatureFilter
        • QAmbientTemperatureReading
        • QAmbientTemperatureSensor
        • QCompass
        • QCompassFilter
        • QCompassReading
        • QGyroscope
        • QGyroscopeFilter
        • QGyroscopeReading
        • QHumidityFilter
        • QHumidityReading
        • QHumiditySensor
        • QIRProximityFilter
        • QIRProximityReading
        • QIRProximitySensor
        • QLidFilter
        • QLidReading
        • QLidSensor
        • QLightFilter
        • QLightReading
        • QLightSensor
        • QMagnetometer
        • QMagnetometerFilter
        • QMagnetometerReading
        • QOrientationFilter
        • QOrientationReading
        • QOrientationSensor
        • QPressureFilter
        • QPressureReading
        • QPressureSensor
        • QProximityFilter
        • QProximityReading
        • QProximitySensor
        • QRotationFilter
        • QRotationReading
        • QRotationSensor
        • QSensor
        • QSensorBackend
        • QSensorBackendFactory
        • QSensorChangesInterface
        • QSensorFilter
        • QSensorManager
        • QSensorPluginInterface
        • QSensorReading
        • QTapFilter
        • QTapReading
        • QTapSensor
        • QTiltFilter
        • QTiltReading
        • QTiltSensor
        • qoutputrange
      • PySide6.QtSerialPort
        • QSerialPort
        • QSerialPortInfo
      • PySide6.QtSpatialAudio
        • QAmbientSound
        • QAudioEngine
        • QAudioListener
        • QAudioRoom
        • QSpatialSound
      • PySide6.QtSql
        • QSql
        • QSqlDatabase
        • QSqlDriver
        • QSqlDriverCreatorBase
        • QSqlError
        • QSqlField
        • QSqlIndex
        • QSqlQuery
        • QSqlQueryModel
        • QSqlRecord
        • QSqlRelation
        • QSqlRelationalTableModel
        • QSqlResult
        • QSqlTableModel
      • PySide6.QtStateMachine
        • QAbstractState
        • QAbstractTransition
        • QEventTransition
        • QFinalState
        • QHistoryState
        • QKeyEventTransition
        • QMouseEventTransition
        • QSignalTransition
        • QState
        • QStateMachine
        • SignalEvent
        • WrappedEvent
      • PySide6.QtSvg
        • QSvgGenerator
        • QSvgRenderer
      • PySide6.QtSvgWidgets
        • QGraphicsSvgItem
        • QSvgWidget
      • PySide6.QtTest
        • QAbstractItemModelTester
        • QSignalSpy
        • QTest
      • PySide6.QtTextToSpeech
        • QTextToSpeech
        • QTextToSpeechEngine
        • QVoice
      • PySide6.QtUiTools
        • QUiLoader
        • loadUiType
      • PySide6.QtWebChannel
        • QWebChannel
        • QWebChannelAbstractTransport
      • PySide6.QtWebEngineCore
        • FilterRequest
        • QWebEngineCertificateError
        • QWebEngineContextMenuRequest
        • QWebEngineCookieStore
        • QWebEngineDownloadRequest
        • QWebEngineFindTextResult
        • QWebEngineFullScreenRequest
        • QWebEngineHistory
        • QWebEngineHistoryItem
        • QWebEngineHistoryModel
        • QWebEngineHttpRequest
        • QWebEngineLoadingInfo
        • QWebEngineNewWindowRequest
        • QWebEngineNotification
        • QWebEnginePage
        • QWebEngineProfile
        • QWebEngineQuotaRequest
        • QWebEngineRegisterProtocolHandlerRequest
        • QWebEngineScript
        • QWebEngineScriptCollection
        • QWebEngineSettings
        • QWebEngineUrlRequestInfo
        • QWebEngineUrlRequestInterceptor
        • QWebEngineUrlRequestJob
        • QWebEngineUrlScheme
        • QWebEngineUrlSchemeHandler
      • PySide6.QtWebEngineQuick
        • QQuickWebEngineProfile
        • QtWebEngineQuick
      • PySide6.QtWebEngineWidgets
        • QWebEngineView
      • PySide6.QtWebSockets
        • QMaskGenerator
        • QWebSocket
        • QWebSocketCorsAuthenticator
        • QWebSocketHandshakeOptions
        • QWebSocketProtocol
        • QWebSocketServer
      • PySide6.QtWidgets
        • ExtraSelection
        • QAbstractButton
        • QAbstractGraphicsShapeItem
        • QAbstractItemDelegate
        • QAbstractItemView
        • QAbstractScrollArea
        • QAbstractSlider
        • QAbstractSpinBox
        • QAccessibleWidget
        • QApplication
        • QBoxLayout
        • QButtonGroup
        • QCalendarWidget
        • QCheckBox
        • QColorDialog
        • QColormap
        • QColumnView
        • QComboBox
        • QCommandLinkButton
        • QCommonStyle
        • QCompleter
        • QDataWidgetMapper
        • QDateEdit
        • QDateTimeEdit
        • QDial
        • QDialog
        • QDialogButtonBox
        • QDockWidget
        • QDoubleSpinBox
        • QErrorMessage
        • QFileDialog
        • QFileIconProvider
        • QFileSystemModel
        • QFocusFrame
        • QFontComboBox
        • QFontDialog
        • QFormLayout
        • QFrame
        • QGesture
        • QGestureEvent
        • QGestureRecognizer
        • QGraphicsAnchor
        • QGraphicsAnchorLayout
        • QGraphicsBlurEffect
        • QGraphicsColorizeEffect
        • QGraphicsDropShadowEffect
        • QGraphicsEffect
        • QGraphicsEllipseItem
        • QGraphicsGridLayout
        • QGraphicsItem
        • QGraphicsItemAnimation
        • QGraphicsItemGroup
        • QGraphicsLayout
        • QGraphicsLayoutItem
        • QGraphicsLineItem
        • QGraphicsLinearLayout
        • QGraphicsObject
        • QGraphicsOpacityEffect
        • QGraphicsPathItem
        • QGraphicsPixmapItem
        • QGraphicsPolygonItem
        • QGraphicsProxyWidget
        • QGraphicsRectItem
        • QGraphicsRotation
        • QGraphicsScale
        • QGraphicsScene
        • QGraphicsSceneContextMenuEvent
        • QGraphicsSceneDragDropEvent
        • QGraphicsSceneEvent
        • QGraphicsSceneHelpEvent
        • QGraphicsSceneHoverEvent
        • QGraphicsSceneMouseEvent
        • QGraphicsSceneMoveEvent
        • QGraphicsSceneResizeEvent
        • QGraphicsSceneWheelEvent
        • QGraphicsSimpleTextItem
        • QGraphicsTextItem
        • QGraphicsTransform
        • QGraphicsView
        • QGraphicsWidget
        • QGridLayout
        • QGroupBox
        • QHBoxLayout
        • QHeaderView
        • QInputDialog
        • QItemDelegate
        • QItemEditorCreatorBase
        • QItemEditorFactory
        • QKeySequenceEdit
        • QLCDNumber
        • QLabel
        • QLayout
        • QLayoutItem
        • QLineEdit
        • QListView
        • QListWidget
        • QListWidgetItem
        • QMainWindow
        • QMdiArea
        • QMdiSubWindow
        • QMenu
        • QMenuBar
        • QMessageBox
        • QPanGesture
        • QPinchGesture
        • QPlainTextDocumentLayout
        • QPlainTextEdit
        • QProgressBar
        • QProgressDialog
        • QProxyStyle
        • QPushButton
        • QRadioButton
        • QRubberBand
        • QScrollArea
        • QScrollBar
        • QScroller
        • QScrollerProperties
        • QSizeGrip
        • QSizePolicy
        • QSlider
        • QSpacerItem
        • QSpinBox
        • QSplashScreen
        • QSplitter
        • QSplitterHandle
        • QStackedLayout
        • QStackedWidget
        • QStatusBar
        • QStyle
        • QStyleFactory
        • QStyleHintReturn
        • QStyleHintReturnMask
        • QStyleHintReturnVariant
        • QStyleOption
        • QStyleOptionButton
        • QStyleOptionComboBox
        • QStyleOptionComplex
        • QStyleOptionDockWidget
        • QStyleOptionFocusRect
        • QStyleOptionFrame
        • QStyleOptionGraphicsItem
        • QStyleOptionGroupBox
        • QStyleOptionHeader
        • QStyleOptionHeaderV2
        • QStyleOptionMenuItem
        • QStyleOptionProgressBar
        • QStyleOptionRubberBand
        • QStyleOptionSizeGrip
        • QStyleOptionSlider
        • QStyleOptionSpinBox
        • QStyleOptionTab
        • QStyleOptionTabBarBase
        • QStyleOptionTabWidgetFrame
        • QStyleOptionTitleBar
        • QStyleOptionToolBar
        • QStyleOptionToolBox
        • QStyleOptionToolButton
        • QStyleOptionViewItem
        • QStylePainter
        • QStyledItemDelegate
        • QSwipeGesture
        • QSystemTrayIcon
        • QTabBar
        • QTabWidget
        • QTableView
        • QTableWidget
        • QTableWidgetItem
        • QTableWidgetSelectionRange
        • QTapAndHoldGesture
        • QTapGesture
        • QTextBrowser
        • QTextEdit
        • QTileRules
        • QTimeEdit
        • QToolBar
        • QToolBox
        • QToolButton
        • QToolTip
        • QTreeView
        • QTreeWidget
        • QTreeWidgetItem
        • QTreeWidgetItemIterator
        • QUndoView
        • QVBoxLayout
        • QWhatsThis
        • QWidget
        • QWidgetAction
        • QWidgetItem
        • QWizard
        • QWizardPage
        • TakeRowResult
      • PySide6.QtXml
        • QDomAttr
        • QDomCDATASection
        • QDomCharacterData
        • QDomComment
        • QDomDocument
        • QDomDocumentFragment
        • QDomDocumentType
        • QDomElement
        • QDomEntity
        • QDomEntityReference
        • QDomImplementation
        • QDomNamedNodeMap
        • QDomNode
        • QDomNodeList
        • QDomNotation
        • QDomProcessingInstruction
        • QDomText
  • Tutorials
    • Qt, QML, Widgets…What Is The Difference?
    • Which IDEs Are Compatible?
    • Binding Generation: What Is Shiboken?
    • File Types
    • Distributing Your Application to Other Systems/Platforms
    • Why Qt for Python?
    • Your First QtWidgets Application
    • Using a Simple Button
    • Signals and Slots
    • Creating a Dialog Application
    • Displaying Data Using a Table Widget
    • Displaying Data Using a Tree Widget
    • Using .ui files from Designer or QtCreator with QUiLoader and pyside6-uic
    • Using .qrc Files (pyside6-rcc)
    • Translating Applications
    • Styling the Widgets Application
    • Your First QtQuick/QML Application
    • Python-QML integration
    • QML Application Tutorial
    • QML, SQL and PySide Integration Tutorial
    • Data Visualization Tool Tutorial
      • Chapter 1 - Reading data from a CSV
      • Chapter 2 - Filtering data
      • Chapter 3 - Create an empty QMainWindow
      • Chapter 4 - Add a QTableView
      • Chapter 5 - Add a chart view
      • Chapter 6 - Plot the data in the ChartView
    • Expenses Tool Tutorial
    • Porting a C++ Application to Python
      • Chapter 1: initDb.h to createDb.py
      • Chapter 2: bookdelegate.cpp to bookdelegate.py
      • Chapter 3: Port bookdwindow.cpp to bookwindow.py
    • How To Debug a C++ Extension of a PySide6 Application?
      • Debugging PySide with Qt Creator (Linux)
      • Debugging PySide with VSCode (Linux + Windows)
  • Qt for Python Examples
    • Simple Qt 3D Example
    • Async examples
    • Async examples
    • Ax Viewer Example
    • Bluetooth Scanner Example
    • Bluetooth Low Energy Heart Rate Server
    • Bluetooth Low Energy Heart Rate Game
    • Line Chart Example
    • Callout Example
    • Light Markers and Points Selection Example
    • Memory Usag Example
    • Donut Chart Breakdown Example
    • Percent Bar Chart Example
    • Pie Chart Example
    • Temperature Records Example
    • Logarithmic Axis Example
    • Chart Themes Example
    • Legend Example
    • Line and Bar Chart Example
    • Area Chart Example
    • QML Polar Chart Example
    • Bar Chart Example
    • Nested Donuts Example
    • Audio Example
    • Dynamic Spline Example
    • Model Data Example
    • Mandelbrot Threads Example
    • Settings Editor Example
    • MIME Type Browser Example
    • examples/corelib/ipc/sharedmemory
    • Surface Example
    • Bars 3D Example
    • Surface Example
    • Surface Example
    • examples/dbus/listnames
    • examples/dbus/pingpong
    • Task Menu Extension (Designer)
    • Networkx viewer Example
    • Scikit Image Example
    • OpenCV Face Detection Example
    • Matplotlib Widget 3D Example
    • Matplotlib Widget Gaussian Example
    • Pandas Simple Example
    • Analog Clock Window Example
    • examples/macextras/macpasteboardmime
    • Player Example
    • Audio Source Example
    • Audio Output Example
    • Camera Example
    • Loopback Example
    • Downloader Example
    • examples/network/threadedfortuneserver
    • examples/network/blockingfortuneclient
    • Google Suggest Example
    • examples/network/fortuneclient
    • examples/network/fortuneserver
    • Reddit Example
    • examples/opcua/opcuaviewer
    • Texture Example
    • Context Info Example
    • Hello GL2 Example
    • Threaded QOpenGLWidget Example
    • PDF Viewer Example
    • PDF Viewer Example
    • Extending QML - Binding Example
    • Extending QML - Methods Example
    • Extending QML - Attached Properties Example
    • Extending QML - Object and List Property Types Example
    • Extending QML - Value Source Example
    • Extending QML - Grouped Properties Example
    • Extending QML - Adding Types Example
    • Extending QML - Inheritance and Coercion Example
    • Extending QML - Extension Objects Example
    • Extending QML - Default Property Example
    • Using Model Example
    • examples/qml/signals/qmltopy2
    • examples/qml/signals/qmltopy1
    • examples/qml/signals/pytoqml2
    • examples/qml/signals/qmltopy4
    • examples/qml/signals/pytoqml1
    • examples/qml/signals/qmltopy3
    • Text Properties Example
    • QAbstractListModel in QML
    • examples/qml/tutorials/extending/chapter2-methods
    • examples/qml/tutorials/extending/chapter4-customPropertyTypes
    • examples/qml/tutorials/extending/chapter5-listproperties
    • examples/qml/tutorials/extending/chapter1-basics
    • examples/qml/tutorials/extending/chapter3-bindings
    • Extending QML - Plugins Example
    • String List Model Example
    • Object List Model Example
    • QQuickRenderControl OpenGL Example
    • OpenGL under QML Squircle
    • Scene Graph Painted Item Example
    • Qt Quick Examples - Window and Screen
    • Custom Geometry Example
    • Introduction Example Qt Quick 3D
    • Qt Quick Controls 2 - Gallery
    • examples/remoteobjects/modelview
    • Sample Bindings Example
    • Using CMake
    • Scriptable Application Example
    • Terminal Example
    • Spatial Audio Panning Example
    • SQL Books Example
    • examples/statemachine/twowaybutton
    • examples/statemachine/factstates
    • examples/statemachine/rogue
    • examples/statemachine/eventtrans
    • examples/statemachine/ping_pong
    • Traffic Light Example
    • examples/texttospeech/hello_speak
    • examples/uitools/uiloader
    • WebChannel Standalone Example
    • Nano Browser Example
    • Simple Browser Example
    • Web Browser Example
    • WebEngine Notifications Example
    • examples/webenginewidgets/markdowneditor
    • examples/widgets/linguist
    • Syntax Highlighter Example
    • TextObject Example
    • examples/widgets/richtext/orderform
    • TextEdit Example
    • examples/widgets/imageviewer
    • Digital Clock Example
    • Character Map Example
    • Tetrix
    • Widgets Gallery Example
    • Screenshot Example
    • examples/widgets/desktop/systray
    • Address Book Example
    • JSON Model Example
    • Star Delegate Example
    • Editable Tree Model Example
    • Dir View Example
    • examples/widgets/itemviews/fetchmore
    • SpinBox Delegate Example
    • examples/widgets/itemviews/basicfiltermodel
    • examples/widgets/draganddrop/draggabletext
    • Drop Site Example
    • States Example
    • Animated Tiles Example
    • Easing Example
    • Application Chooser Example
    • examples/widgets/dialogs/extension
    • examples/widgets/dialogs/trivialwizard
    • examples/widgets/dialogs/findfiles
    • Classwizard Example
    • examples/widgets/dialogs/standarddialogs
    • License Wizard Example
    • Tab Dialog Example
    • Flow Layout Example
    • Basic Layouts Example
    • Dynamic Layouts Example
    • Border Layout Example
    • examples/widgets/gettext
    • QRegularExpression Example
    • examples/widgets/effects/lighting
    • Blur Picker Effect Example
    • Dock Widget Example
    • examples/widgets/mainwindows/mdi
    • examples/widgets/mainwindows/application
    • Code Editor Example
    • examples/widgets/thread_signals
    • examples/widgets/graphicsview/dragdroprobot
    • examples/widgets/graphicsview/collidingmice
    • examples/widgets/graphicsview/anchorlayout
    • examples/widgets/graphicsview/diagramscene
    • examples/widgets/graphicsview/elasticnodes
    • Plot Example
    • Basic Drawing Example
    • Painter Example
    • Concentric Circles Examples
    • Model View Tutorial Examples
    • Cannon Example
    • Address Book Example
    • DOM Bookmarks Example
  • Videos
  • Deployment
    • Qt for Python & fbs
    • Qt for Python & PyInstaller
    • Qt for Python & cx_Freeze
    • Qt for Python & Briefcase
    • Qt for Python & py2exe
    • Qt for Python & Nuitka
  • Considerations
  • Developer Notes
    • Add a new module
    • Add a new example or port one
    • Add a new tool or a Qt tool wrapper
    • Test a wheel
    • Build on the command line
    • The Set of Enum Features
    • The Transition To The Limited Python API (PEP384)
    • The signature C extension
    • Why do we have a __feature__?
    • The snake_case feature
    • The true_property feature
    • The __feature__ import
  • Module Index
Back to top

Menus Example#

The Menus example demonstrates how menus can be used in a main window application.

A menu widget can be either a pull-down menu in a menu bar or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item or presses the specified shortcut key. Context menus are usually invoked by some special keyboard key or by right-clicking.

../_images/menus-example.png

A menu consists of a list of action items. In applications, many common commands can be invoked via menus, toolbar buttons as well as keyboard shortcuts. Since the user expects the commands to be performed in the same way, regardless of the user interface used, it is useful to represent each command as an action.

The Menus example consists of one single class, MainWindow, derived from the QMainWindow class. When choosing one of the action items in our application, it will display the item’s path in its central widget.

MainWindow Class Definition#

QMainWindow provides a main application window, with a menu bar, tool bars, dock widgets and a status bar around a large central widget.

class MainWindow(QMainWindow):

    Q_OBJECT
# public
    MainWindow()
# protected
#ifndef QT_NO_CONTEXTMENU
    def contextMenuEvent(event):
#endif // QT_NO_CONTEXTMENU

In this example, we will see how to implement pull-down menus as well as a context menu. In order to implement a custom context menu we must reimplement QWidget ‘s contextMenuEvent() function to receive the context menu events for our main window.

# private slots
    def newFile():
    def open():
    def save():
    def print():
    def undo():
    def redo():
    def cut():
    def copy():
    def paste():
    def bold():
    def italic():
    def leftAlign():
    def rightAlign():
    def justify():
    def center():
    def setLineSpacing():
    def setParagraphSpacing():
    def about():
    def aboutQt():

We must also implement a collection of private slots to respond to the user activating any of our menu entries. Note that these slots are left out of this documentation since they are trivial, i.e., most of them are only displaying the action’s path in the main window’s central widget.

# private
    def createActions():
    def createMenus():

We have chosen to simplify the constructor by implementing two private convenience functions to create the various actions, to add them to menus and to insert the menus into our main window’s menu bar.

fileMenu = QMenu()
editMenu = QMenu()
formatMenu = QMenu()
helpMenu = QMenu()
alignmentGroup = QActionGroup()
newAct = QAction()
openAct = QAction()
saveAct = QAction()
printAct = QAction()
exitAct = QAction()
undoAct = QAction()
redoAct = QAction()
cutAct = QAction()
copyAct = QAction()
pasteAct = QAction()
boldAct = QAction()
italicAct = QAction()
leftAlignAct = QAction()
rightAlignAct = QAction()
justifyAct = QAction()
centerAct = QAction()
setLineSpacingAct = QAction()
setParagraphSpacingAct = QAction()
aboutAct = QAction()
aboutQtAct = QAction()
infoLabel = QLabel()

Finally, we declare the various menus and actions as well as a simple information label in the application wide scope.

The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus while the QAction class provides an abstract user interface action that can be inserted into widgets.

In some situations it is useful to group actions together, e.g., we have a Left Align action, a Right Align action, a Justify action, and a Center action, and we want only one of these actions to be active at any one time. One simple way of achieving this is to group the actions together in an action group using the QActionGroup class.

MainWindow Class Implementation#

In the constructor, we start off by creating a regular QWidget and make it our main window’s central widget. Note that the main window takes ownership of the widget pointer and deletes it at the appropriate time.

def __init__(self):

    widget = QWidget()
    setCentralWidget(widget)
topFiller = QWidget()
topFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
infoLabel = QLabel(tr("<i>Choose a menu option, or right-click to "
                          "invoke a context menu</i>"))
infoLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
infoLabel.setAlignment(Qt.AlignCenter)
bottomFiller = QWidget()
bottomFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
layout = QVBoxLayout()
layout.setContentsMargins(5, 5, 5, 5)
layout.addWidget(topFiller)
layout.addWidget(infoLabel)
layout.addWidget(bottomFiller)
widget.setLayout(layout)

Then we create the information label as well as a top and bottom filler that we add to a layout which we install on the central widget. QMainWindow objects come with their own customized layout and setting a layout on a the actual main window, or creating a layout with a main window as a parent, is considered an error. You should always set your own layout on the central widget instead.

createActions()
createMenus()
message = tr("A context menu is available by right-clicking")
statusBar().showMessage(message)
setWindowTitle(tr("Menus"))
setMinimumSize(160, 160)
resize(480, 320)

To create the actions and menus we call our two convenience functions: createActions() and createMenus(). We will get back to these shortly.

QMainWindow ‘s statusBar() function returns the status bar for the main window (if the status bar does not exist, this function will create and return an empty status bar). We initialize the status bar and window title, resize the window to an appropriate size as well as ensure that the main window cannot be resized to a smaller size than the given one.

Now, let’s take a closer look at the createActions() convenience function that creates the various actions:

def createActions(self):


    newAct = QAction(tr("New"), self)
    newAct.setShortcuts(QKeySequence.New)
    newAct.setStatusTip(tr("Create a file()"))
    newAct.triggered.connect(self.newFile)            ...

A QAction object may contain an icon, a text, a shortcut, a status tip, a “What’s This?” text, and a tooltip. Most of these can be set in the constructor, but they can also be set independently using the provided convenience functions.

In the createActions() function, we first create a newAct action. We make Ctrl+N its shortcut using the setShortcut() function, and we set its status tip using the setStatusTip() function (the status tip is displayed on all status bars provided by the action’s top-level parent widget). We also connect its triggered() signal to the newFile() slot.

The rest of the actions are created in a similar manner. Please see the source code for details.

alignmentGroup = QActionGroup(self)
alignmentGroup.addAction(leftAlignAct)
alignmentGroup.addAction(rightAlignAct)
alignmentGroup.addAction(justifyAct)
alignmentGroup.addAction(centerAct)
leftAlignAct.setChecked(True)

Once we have created the Left Align, Right Align, Justify, and a Center actions, we can also create the previously mentioned action group.

Each action is added to the group using QActionGroup ‘s addAction() function. Note that an action also can be added to a group by creating it with the group as its parent. Since an action group is exclusive by default, only one of the actions in the group is checked at any one time (this can be altered using the setExclusive() function).

When all the actions are created, we use the createMenus() function to add the actions to the menus and to insert the menus into the menu bar:

def createMenus(self):


    fileMenu = menuBar().addMenu(tr("File"))
    fileMenu.addAction(newAct)

    fileMenu.addAction(openAct)

    fileMenu.addAction(saveAct)
    fileMenu.addAction(printAct)

    fileMenu.addSeparator()

    fileMenu.addAction(exitAct)
    editMenu = menuBar().addMenu(tr("Edit"))
    editMenu.addAction(undoAct)
    editMenu.addAction(redoAct)
    editMenu.addSeparator()
    editMenu.addAction(cutAct)
    editMenu.addAction(copyAct)
    editMenu.addAction(pasteAct)
    editMenu.addSeparator()
    helpMenu = menuBar().addMenu(tr("Help"))
    helpMenu.addAction(aboutAct)
    helpMenu.addAction(aboutQtAct)

QMenuBar ‘s addMenu() function appends a new QMenu with the given title, to the menu bar (note that the menu bar takes ownership of the menu). We use QWidget ‘s addAction() function to add each action to the corresponding menu.

Alternatively, the QMenu class provides several addAction() convenience functions that create and add new actions from given texts and/or icons. You can also provide a member that will automatically connect to the new action’s triggered() signal, and a shortcut represented by a QKeySequence instance.

The addSeparator() function creates and returns a new separator action, i.e. an action for which isSeparator() returns true, and adds the new action to the menu’s list of actions.

formatMenu = editMenu.addMenu(tr("Format"))
formatMenu.addAction(boldAct)
formatMenu.addAction(italicAct)
formatMenu.addSeparator().setText(tr("Alignment"))
formatMenu.addAction(leftAlignAct)
formatMenu.addAction(rightAlignAct)
formatMenu.addAction(justifyAct)
formatMenu.addAction(centerAct)
formatMenu.addSeparator()
formatMenu.addAction(setLineSpacingAct)
formatMenu.addAction(setParagraphSpacingAct)

Note the Format menu. First of all, it is added as a submenu to the Edit Menu using QMenu ‘s addMenu() function. Secondly, take a look at the alignment actions: In the createActions() function we added the leftAlignAct, rightAlignAct, justifyAct and centerAct actions to an action group. Nevertheless, we must add each action to the menu separately while the action group does its magic behind the scene.

#ifndef QT_NO_CONTEXTMENU
def contextMenuEvent(self, event):

    menu = QMenu(self)
    menu.addAction(cutAct)
    menu.addAction(copyAct)
    menu.addAction(pasteAct)
    menu.exec(event.globalPos())

#endif // QT_NO_CONTEXTMENU

To provide a custom context menu, we must reimplement QWidget ‘s contextMenuEvent() function to receive the widget’s context menu events (note that the default implementation simply ignores these events).

Whenever we receive such an event, we create a menu containing the Cut, Copy and Paste actions. Context menus can be executed either asynchronously using the popup() function or synchronously using the exec() function. In this example, we have chosen to show the menu using its exec() function. By passing the event’s position as argument we ensure that the context menu appears at the expected position.

Example project @ code.qt.io

Copyright © 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 (https://www.gnu.org/licenses/fdl.html) as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Made with Sphinx and @pradyunsg's Furo
On this page
  • Menus Example
    • MainWindow Class Definition
    • MainWindow Class Implementation