|  | Home · All Classes · Modules

# QtGui Module

The QtGui module extends QtCore with GUI functionality. More...

### Types

- class QAbstractButton
- class QAbstractGraphicsShapeItem
- class QAbstractItemDelegate
- class QAbstractItemView
- class QAbstractPrintDialog
- class QAbstractProxyModel
- class QAbstractScrollArea
- class QAbstractSlider
- class QAbstractSpinBox
- class QAbstractTextDocumentLayout
- class QAction
- class QActionEvent
- class QActionGroup
- class QApplication
- class QBitmap
- class QBoxLayout
- class QBrush
- class QButtonGroup
- class QCalendarWidget
- class QCheckBox
- class QClipboard
- class QCloseEvent
- class QColor
- class QColorDialog
- class QColumnView
- class QComboBox
- class QCommandLinkButton
- class QCompleter
- class QConicalGradient
- class QContextMenuEvent
- class QCursor
- class QDataWidgetMapper
- class QDateEdit
- class QDateTimeEdit
- class QDesktopServices
- class QDesktopWidget
- class QDial
- class QDialog
- class QDialogButtonBox
- class QDirModel
- class QDockWidget
- class QDoubleSpinBox
- class QDoubleValidator
- class QDrag
- class QDragEnterEvent
- class QDragLeaveEvent
- class QDragMoveEvent
- class QDropEvent
- class QErrorMessage
- class QFileDialog
- class QFileIconProvider
- class QFileOpenEvent
- class QFileSystemModel
- class QFocusEvent
- class QFocusFrame
- class QFont
- class QFontComboBox
- class QFontDatabase
- class QFontDialog
- class QFontInfo
- class QFontMetrics
- class QFontMetricsF
- class QFormLayout
- class QFrame
- class QGesture
- class QGestureEvent
- class QGestureRecognizer
- class QGradient
- class QGraphicsAnchor
- class QGraphicsAnchorLayout
- class QGraphicsBlurEffect
- class QGraphicsColorizeEffect
- class QGraphicsDropShadowEffect
- class QGraphicsEffect
- class QGraphicsEllipseItem
- class QGraphicsGridLayout
- class QGraphicsItem
- class QGraphicsItemAnimation
- class QGraphicsItemGroup
- class QGraphicsLayout
- class QGraphicsLayoutItem
- class QGraphicsLinearLayout
- class QGraphicsLineItem
- class QGraphicsObject
- class QGraphicsOpacityEffect
- class QGraphicsPathItem
- class QGraphicsPixmapItem
- class QGraphicsPolygonItem
- class QGraphicsProxyWidget
- class QGraphicsRectItem
- class QGraphicsRotation
- class QGraphicsScale
- class QGraphicsScene
- class QGraphicsSceneContextMenuEvent
- class QGraphicsSceneDragDropEvent
- class QGraphicsSceneEvent
- class QGraphicsSceneHelpEvent
- class QGraphicsSceneHoverEvent
- class QGraphicsSceneMouseEvent
- class QGraphicsSceneMoveEvent
- class QGraphicsSceneResizeEvent
- class QGraphicsSceneWheelEvent
- class QGraphicsSimpleTextItem
- class QGraphicsTextItem
- class QGraphicsTransform
- class QGraphicsView
- class QGraphicsWidget
- class QGridLayout
- class QGroupBox
- class QHBoxLayout
- class QHeaderView
- class QHelpEvent
- class QHideEvent
- class QHoverEvent
- class QIcon
- class QIconDragEvent
- class QIconEngine
- class QIconEngineV2
- class QImage
- class QImageIOHandler
- class QImageReader
- class QImageWriter
- class QInputContext
- class QInputContextFactory
- class QInputDialog
- class QInputEvent
- class QInputMethodEvent
- class QIntValidator
- class QItemDelegate
- class QItemEditorCreatorBase
- class QItemEditorFactory
- class QItemSelection
- class QItemSelectionModel
- class QItemSelectionRange
- class QKeyEvent
- class QKeyEventTransition
- class QKeySequence
- class QLabel
- class QLayout
- class QLayoutItem
- class QLCDNumber
- class QLinearGradient
- class QLineEdit
- class QListView
- class QListWidget
- class QListWidgetItem
- class QMainWindow
- class QMatrix
- class QMatrix2x2
- class QMatrix2x3
- class QMatrix2x4
- class QMatrix3x2
- class QMatrix3x3
- class QMatrix3x4
- class QMatrix4x2
- class QMatrix4x3
- class QMatrix4x4
- class QMdiArea
- class QMdiSubWindow
- class QMenu
- class QMenuBar
- class QMessageBox
- class QMimeSource
- class QMouseEvent
- class QMouseEventTransition
- class QMoveEvent
- class QMovie
- class QPageSetupDialog
- class QPaintDevice
- class QPaintEngine
- class QPaintEngineState
- class QPainter
- class QPainterPath
- class QPainterPathStroker
- class QPaintEvent
- class QPalette
- class QPanGesture
- class QPen
- class QPicture
- class QPictureIO
- class QPinchGesture
- class QPixmap
- class QPixmapCache
- class QPlainTextDocumentLayout
- class QPlainTextEdit
- class QPolygon
- class QPolygonF
- class QPrintDialog
- class QPrintEngine
- class QPrinter
- class QPrinterInfo
- class QPrintPreviewDialog
- class QPrintPreviewWidget
- class QProgressBar
- class QProgressDialog
- class QProxyModel
- class QPushButton
- class QPyTextObject
- class QQuaternion
- class QRadialGradient
- class QRadioButton
- class QRegExpValidator
- class QRegion
- class QResizeEvent
- class QRubberBand
- class QScrollArea
- class QScrollBar
- class QSessionManager
- class QShortcut
- class QShortcutEvent
- class QShowEvent
- class QSizeGrip
- class QSizePolicy
- class QSlider
- class QSortFilterProxyModel
- class QSound
- class QSpacerItem
- class QSpinBox
- class QSplashScreen
- class QSplitter
- class QSplitterHandle
- class QStackedLayout
- class QStackedWidget
- class QStandardItem
- class QStandardItemModel
- class QStatusBar
- class QStatusTipEvent
- class QStringListModel
- class QStyle
- class QStyledItemDelegate
- class QStyleFactory
- class QStyleHintReturn
- class QStyleHintReturnMask
- class QStyleHintReturnVariant
- class QStyleOption
- class QStyleOptionButton
- class QStyleOptionComboBox
- class QStyleOptionComplex
- class QStyleOptionDockWidget
- class QStyleOptionDockWidgetV2
- class QStyleOptionFocusRect
- class QStyleOptionFrame
- class QStyleOptionFrameV2
- class QStyleOptionFrameV3
- class QStyleOptionGraphicsItem
- class QStyleOptionGroupBox
- class QStyleOptionHeader
- class QStyleOptionMenuItem
- class QStyleOptionProgressBar
- class QStyleOptionProgressBarV2
- class QStyleOptionRubberBand
- class QStyleOptionSizeGrip
- class QStyleOptionSlider
- class QStyleOptionSpinBox
- class QStyleOptionTab
- class QStyleOptionTabBarBase
- class QStyleOptionTabBarBaseV2
- class QStyleOptionTabV2
- class QStyleOptionTabV3
- class QStyleOptionTabWidgetFrame
- class QStyleOptionTabWidgetFrameV2
- class QStyleOptionTitleBar
- class QStyleOptionToolBar
- class QStyleOptionToolBox
- class QStyleOptionToolBoxV2
- class QStyleOptionToolButton
- class QStyleOptionViewItem
- class QStyleOptionViewItemV2
- class QStyleOptionViewItemV3
- class QStyleOptionViewItemV4
- class QStylePainter
- class QSwipeGesture
- class QSyntaxHighlighter
- class QSystemTrayIcon
- class QTabBar
- class QTabletEvent
- class QTableView
- class QTableWidget
- class QTableWidgetItem
- class QTableWidgetSelectionRange
- class QTabWidget
- class QTapAndHoldGesture
- class QTapGesture
- class QTextBlock
- class QTextBlockFormat
- class QTextBlockGroup
- class QTextBlockUserData
- class QTextBrowser
- class QTextCharFormat
- class QTextCursor
- class QTextDocument
- class QTextDocumentFragment
- class QTextDocumentWriter
- class QTextEdit
- class QTextFormat
- class QTextFragment
- class QTextFrame
- class QTextFrameFormat
- class QTextImageFormat
- class QTextInlineObject
- class QTextItem
- class QTextLayout
- class QTextLength
- class QTextLine
- class QTextList
- class QTextListFormat
- class QTextObject
- class QTextObjectInterface
- class QTextOption
- class QTextTable
- class QTextTableCell
- class QTextTableCellFormat
- class QTextTableFormat
- class QTimeEdit
- class QToolBar
- class QToolBox
- class QToolButton
- class QToolTip
- class QTouchEvent
- class QTransform
- class QTreeView
- class QTreeWidget
- class QTreeWidgetItem
- class QTreeWidgetItemIterator
- class QUndoCommand
- class QUndoGroup
- class QUndoStack
- class QUndoView
- class QValidator
- class QVBoxLayout
- class QVector2D
- class QVector3D
- class QVector4D
- class QWhatsThis
- class QWhatsThisClickedEvent
- class QWheelEvent
- class QWidget
- class QWidgetAction
- class QWidgetItem
- class QWindowStateChangeEvent
- class QWizard
- class QWizardPage
- class QWorkspace
- class QX11EmbedContainer
- class QX11EmbedWidget
- class QX11Info

### Module Functions

- int qAlpha (int)
- int qBlue (int)
- qDrawBorderPixmap (QPainter, QRect, QMargins, QPixmap)
- qDrawPlainRect (QPainter, int, int, int, int, QColor, int lineWidth = 1, QBrush fill = None)
- qDrawPlainRect (QPainter, QRect, QColor, int lineWidth = 1, QBrush fill = None)
- qDrawShadeLine (QPainter, int, int, int, int, QPalette, bool sunken = True, int lineWidth = 1, int midLineWidth = 0)
- qDrawShadeLine (QPainter, QPoint, QPoint, QPalette, bool sunken = True, int lineWidth = 1, int midLineWidth = 0)
- qDrawShadePanel (QPainter, int, int, int, int, QPalette, bool sunken = False, int lineWidth = 1, QBrush fill = None)
- qDrawShadePanel (QPainter, QRect, QPalette, bool sunken = False, int lineWidth = 1, QBrush fill = None)
- qDrawShadeRect (QPainter, int, int, int, int, QPalette, bool sunken = False, int lineWidth = 1, int midLineWidth = 0, QBrush fill = None)
- qDrawShadeRect (QPainter, QRect, QPalette, bool sunken = False, int lineWidth = 1, int midLineWidth = 0, QBrush fill = None)
- qDrawWinButton (QPainter, int, int, int, int, QPalette, bool sunken = False, QBrush fill = None)
- qDrawWinButton (QPainter, QRect, QPalette, bool sunken = False, QBrush fill = None)
- qDrawWinPanel (QPainter, int, int, int, int, QPalette, bool sunken = False, QBrush fill = None)
- qDrawWinPanel (QPainter, QRect, QPalette, bool sunken = False, QBrush fill = None)
- bool qFuzzyCompare (QMatrix, QMatrix)
- bool qFuzzyCompare (QMatrix4x4, QMatrix4x4)
- bool qFuzzyCompare (QQuaternion, QQuaternion)
- bool qFuzzyCompare (QTransform, QTransform)
- bool qFuzzyCompare (QVector2D, QVector2D)
- bool qFuzzyCompare (QVector3D, QVector3D)
- bool qFuzzyCompare (QVector4D, QVector4D)
- int qGray (int, int, int)
- int qGray (int)
- int qGreen (int)
- bool qIsGray (int)
- int qRed (int)
- int qRgb (int, int, int)
- int qRgba (int, int, int, int)
- qSwap (QBitmap, QBitmap)
- qSwap (QBrush, QBrush)
- qSwap (QIcon, QIcon)
- qSwap (QImage, QImage)
- qSwap (QKeySequence, QKeySequence)
- qSwap (QPen, QPen)
- qSwap (QPicture, QPicture)
- qSwap (QPixmap, QPixmap)
- qt_x11_wait_for_window_manager (QWidget widget)

### Module Members

- QApplication qApp

## Detailed Description

The QtGui module extends QtCore with GUI functionality.

To import the module use, for example, the following statement:

    from PyQt4 import QtGui

## Function Documentation

### int qAlpha (int)

Returns the alpha component of the ARGB quadruplet rgba.

See also qRgb() and QColor.alpha().

### int qBlue (int)

Returns the blue component of the ARGB quadruplet rgb.

See also qRgb() and QColor.blue().

### qDrawBorderPixmap (QPainter, QRect, QMargins, QPixmap)

### qDrawPlainRect (QPainter, int, int, int, int, QColor, int lineWidth = 1, QBrush fill = None)

### qDrawPlainRect (QPainter, QRect, QColor, int lineWidth = 1, QBrush fill = None)

### qDrawShadeLine (QPainter, int, int, int, int, QPalette, bool sunken = True, int lineWidth = 1, int midLineWidth = 0)

### qDrawShadeLine (QPainter, QPoint, QPoint, QPalette, bool sunken = True, int lineWidth = 1, int midLineWidth = 0)

### qDrawShadePanel (QPainter, int, int, int, int, QPalette, bool sunken = False, int lineWidth = 1, QBrush fill = None)

### qDrawShadePanel (QPainter, QRect, QPalette, bool sunken = False, int lineWidth = 1, QBrush fill = None)

### qDrawShadeRect (QPainter, int, int, int, int, QPalette, bool sunken = False, int lineWidth = 1, int midLineWidth = 0, QBrush fill = None)

### qDrawShadeRect (QPainter, QRect, QPalette, bool sunken = False, int lineWidth = 1, int midLineWidth = 0, QBrush fill = None)

### qDrawWinButton (QPainter, int, int, int, int, QPalette, bool sunken = False, QBrush fill = None)

### qDrawWinButton (QPainter, QRect, QPalette, bool sunken = False, QBrush fill = None)

### qDrawWinPanel (QPainter, int, int, int, int, QPalette, bool sunken = False, QBrush fill = None)

### qDrawWinPanel (QPainter, QRect, QPalette, bool sunken = False, QBrush fill = None)

### bool qFuzzyCompare (QMatrix, QMatrix)

### bool qFuzzyCompare (QMatrix4x4, QMatrix4x4)

### bool qFuzzyCompare (QQuaternion, QQuaternion)

### bool qFuzzyCompare (QTransform, QTransform)

### bool qFuzzyCompare (QVector2D, QVector2D)

### bool qFuzzyCompare (QVector3D, QVector3D)

### bool qFuzzyCompare (QVector4D, QVector4D)

### int qGray (int, int, int)

Returns a gray value (0 to 255) from the (r, g, b) triplet.

The gray value is calculated using the formula (r * 11 + g * 16 + b * 5)/32.

### int qGray (int)

This is an overloaded function.

Returns a gray value (0 to 255) from the given ARGB quadruplet rgb.

The gray value is calculated using the formula (R * 11 + G * 16 + B * 5)/32; the alpha-channel is ignored.

### int qGreen (int)

Returns the green component of the ARGB quadruplet rgb.

See also qRgb() and QColor.green().

### bool qIsGray (int)

### int qRed (int)

Returns the red component of the ARGB quadruplet rgb.

See also qRgb() and QColor.red().

### int qRgb (int, int, int)

Returns the ARGB quadruplet (255, r, g, b).

See also qRgba(), qRed(), qGreen(), and qBlue().

### int qRgba (int, int, int, int)

Returns the ARGB quadruplet (a, r, g, b).

See also qRgb(), qRed(), qGreen(), and qBlue().

### qSwap (QBitmap, QBitmap)

### qSwap (QBrush, QBrush)

### qSwap (QIcon, QIcon)

### qSwap (QImage, QImage)

### qSwap (QKeySequence, QKeySequence)

### qSwap (QPen, QPen)

### qSwap (QPicture, QPicture)

### qSwap (QPixmap, QPixmap)

### qt_x11_wait_for_window_manager (QWidget widget)

## Member Documentation

### QApplication qApp

This member should be treated as a constant.

A global pointer referring to the unique application object. It is equivalent to the pointer returned by the QCoreApplication.instance() function except that, in GUI applications, it is a pointer to a QApplication instance.

Only one application object can be created.

See also QCoreApplication.instance().