AnyQt Documentation
AnyQt Documentation
Release 0.0.2 Ales Erjavec
December 30, 2016
Contents
1 AnyQt
3
1.1 AnyQt.QtCore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 AnyQt.QtGui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 AnyQt.QtWidgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 AnyQt.QtPrintSupport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5 AnyQt.QtWebKit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.6 AnyQt.QtWebKitWidgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.7 AnyQt.QtNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.8 AnyQt.QtDBus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.9 AnyQt.QtDesigner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.10 AnyQt.QtHelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.11 AnyQt.QtMacExtras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.12 AnyQt.QtMultimedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.13 AnyQt.QtOpenGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.14 AnyQt.QtSql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.15 AnyQt.QtSvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.16 AnyQt.QtTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.17 AnyQt.QtWinExtras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.18 AnyQt.QtXml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.19 AnyQt.QtXmlPatterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Indices and tables
17
Python Module Index
19
i
ii
AnyQt Documentation, Release 0.0.2
AnyQt is a PyQt4/PyQt5 compatibility layer intended as a stepping stone to full PyQt5 support while still providing support for PyQt4. The idea is to use use a forward compatible module structure that mimics that of Qt5, even when using Qt4 By default PyQt5 is used if available, but that can be changed by a QT_API env variable (which can take either `pyqt4' or `pyqt5' values), or setting the preferred api using the AnyQt.setpreferredapi(). However if any of the Qt apis is already imported (listed in sys.modules) then it is used instead.
Note: The final choice of api is delayed until the first AnyQt.Qt* module is imported
Contents:
Contents
1
AnyQt Documentation, Release 0.0.2
2
Contents
CHAPTER 1
AnyQt
AnyQt.availableapi() Return a list of available Qt interfaces.
AnyQt.setpreferredapi(api) Set the preferred Qt API. Will raise a RuntimeError if a Qt API was already selected. Note that QT_API environment variable (if set) will take precedence.
AnyQt.selectapi(api) Select an Qt API to use. This can only be set once and before any of the Qt modules are explicitly imported.
AnyQt.USED_API = None A string indicating which Qt api is used (will be None until a api is selected and commited to.
1.1 AnyQt.QtCore
Export a Qt5 compatible QtCore module. ? PyQt5: Full PyQt5.QtCore module is reexported ? PyQt4: Full PyQt4.QtCore module is reexported and in addition QAbstractProxyModel, QIdentityProxyModel, QItemSelection, QItemSelectionModel, QItemSelectionRange, QSortFilterProxyModel, QStringListModel, are imported from PyQt4.QtGui
Note: The folowing are not available when using PyQt5:
? `QAbstractFileEngine' ? `QAbstractFileEngineHandler' ? `QAbstractFileEngineIterator' ? `QFSFileEngine' ? `QPyNullVariant' ? `QSystemLocale' ? `SIGNAL'
3
AnyQt Documentation, Release 0.0.2
? `SLOT' ? `qInstallMsgHandler' ? `qSwap'
Note: QUrl in Qt5 has a different interface (some functionality was split into QUrlParse). No attempt is made to taper over the differences.
Use AnyQt.QtCore.QT_VERSION to check if a feature is present.
1.2 AnyQt.QtGui
Export a Qt5 compatible QtGui module. ? PyQt5: Full PyQt5.QtGui module is reexported ? PyQt4: The following members are imported from PyQt4.QtGui: ? `QAbstractTextDocumentLayout' ? `QActionEvent' ? `QBitmap' ? `QBrush' ? `QClipboard' ? `QCloseEvent' ? `QColor' ? `QConicalGradient' ? `QContextMenuEvent' ? `QCursor' ? `QDesktopServices' ? `QDoubleValidator' ? `QDrag' ? `QDragEnterEvent' ? `QDragLeaveEvent' ? `QDragMoveEvent' ? `QDropEvent' ? `QFileOpenEvent' ? `QFocusEvent' ? `QFont' ? `QFontDatabase' ? `QFontInfo' ? `QFontMetrics'
4
Chapter 1. AnyQt
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.