Download the PHP package php-io-extensions/qt without Composer

On this page you can find all versions of the php package php-io-extensions/qt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package qt

ext-qt

CI

1:1 PHP bindings of Qt 6, written directly in C++ against the Zend API. Each PHP class is its C++ counterpart (QApplication, QTimer, QSocketNotifier, …) and each method is one Qt call. Nested C++ scopes become PHP namespaces: Qt::TimerType is Qt\TimerType, QMetaObject::Connection is QMetaObject\Connection. Qt's value classes (QPoint, QSize, QRect, QDate, QKeySequence, QUrl, …) are PHP value objects. No defaults Qt lacks, no composites: behaviour is composed by the caller. What Qt does passes through (invalid values, nullptr as null, its warnings on stderr); the extension refuses a call only where a probe showed it crashes, and tests/Probes shows each one (./configure --enable-qt --enable-qt-probes).

Linux first, macOS too. Qt 6.4+ with the Multimedia and MultimediaWidgets modules, PHP 8.4+, NTS and ZTS.

What is bound

The calls that create the application, pump Qt's event dispatcher, sleep with a budget, wake a sleep, open and close windows, build menu bars, lay widgets out, style them, drive the common controls and play video:

Class Qt
QObject constructor, objectName, setObjectName, inherits, parent, setParent, children, deleteLater, connect (string signature), disconnect
QCoreApplication, QGuiApplication, QApplication constructors, instance, processEvents (both overloads), sendPostedEvents, exec, quit, exit, applicationName, setApplicationName, applicationPid, closingDown, startingUp, setAttribute, testAttribute (Qt\ApplicationAttribute), platformName, desktopFileName, setDesktopFileName, applicationDisplayName, setApplicationDisplayName, quitOnLastWindowClosed, setQuitOnLastWindowClosed
QTimer constructor, start (both overloads), stop, isActive, interval, setInterval, isSingleShot, setSingleShot, timerType, setTimerType, remainingTime, timerId, singleShot (functor overload)
QSocketNotifier constructor (fd as int, stream or Socket), socket, type, isEnabled, setEnabled, isValid
QAbstractEventDispatcher instance, processEvents, wakeUp, interrupt
QMetaObject\Connection operator bool as isValid()
QMetaObject invokeMethod (object, member name, Qt\ConnectionType, arguments converted to its parameter types: calls a slot or emits a signal)
QWidget constructor, createWindowContainer (static; the container owns the window), show, hide, close, isVisible, setVisible, isWindow, window, windowFlags, setWindowFlags, windowModality, setWindowModality, isActiveWindow, activateWindow, setFocus, clearFocus, hasFocus, focusPolicy, setFocusPolicy (Qt\FocusPolicy), setTabOrder (static), raise, windowTitle, setWindowTitle, resize, width, height, size, sizeHint, pos, geometry, setGeometry, move, setMinimumSize, minimumWidth, minimumHeight, setFixedSize, setSizePolicy, setLayout, layout, isEnabled, setEnabled, styleSheet, setStyleSheet, font, setFont, setParent (widgets only), parentWidget, setAttribute, testAttribute
QWindow, QSurface\SurfaceType constructor (needs a QGuiApplication), setSurfaceType, surfaceType, winId (the native handle: an NSView address on macOS; creates the platform window when it has none), create, show, hide, destroy, isExposed, resize, close, width, height, devicePixelRatio, setVulkanInstance, vulkanInstance; the seven surface types
QVulkanInstance constructor, setVkInstance (adopts a VkInstance address, e.g. ext-vulkan's VkInstance::pointer()), create, isValid, errorCode, vkInstance, destroy, static surfaceForWindow (a VkSurfaceKHR address). Present when Qt was built with Vulkan. On macOS set QT_VULKAN_LIB to the loader ($(pkg-config --variable=libdir vulkan)/libvulkan.1.dylib): Qt loads it by name and Homebrew's is outside dyld's search path
QMainWindow constructor, menuBar, setMenuBar, centralWidget, setCentralWidget
QMenuBar, QMenu constructors, addMenu(title), addAction, clear, isNativeMenuBar, setNativeMenuBar; title, setTitle, addSeparator, isEmpty, menuAction, popup(QPoint, ?QAction)
QAction constructor, text, setText, isCheckable, setCheckable, isChecked, setChecked, isEnabled, setEnabled, isSeparator, setSeparator, menuRole, setMenuRole, shortcut, setShortcut (QKeySequence), trigger, toggle
QDialog, QMessageBox, QFileDialog constructors, open, isModal, setModal, result, done, accept, reject; text, setText, informativeText, setInformativeText, addButton (QMessageBox\ButtonRole), setDefaultButton, setEscapeButton, clickedButton; setFileMode, setAcceptMode, setOption (QFileDialog\FileMode, AcceptMode, Option), setDirectory, selectFile, selectedFiles
QClipboard from QGuiApplication::clipboard() (null, with Qt's warning, before a QGuiApplication): setText, text (QClipboard\Mode)
QObject (filters) installEventFilter, removeEventFilter
QOpenGLWidget, QOpenGLPainter, QSurfaceFormat constructor, makeCurrent, doneCurrent, isValid, defaultFramebufferObject, update, setFormat, format; QSurfaceFormat version, profile and renderable type (defaultFormat, setDefaultFormat); trampoline: new QOpenGLPainter(callable, ?QWidget) runs PHP from paintGL()
QEventFilter trampoline: new QEventFilter(callable); hands every event of each watched object to PHP as ($watched, QEvent $event) and returns PHP's bool to Qt, the event alive only during the call
QEvent, QInputEvent, QMouseEvent, QKeyEvent, QWheelEvent, QContextMenuEvent type, accept, ignore, isAccepted, spontaneous; modifiers, timestamp, deviceType (QInputDevice\DeviceType); mouse button, buttons, position, globalPosition; key key (a Qt\Key value), text, isAutoRepeat, nativeScanCode, nativeVirtualKey, matches (a QKeySequence\StandardKey); QInputMethodEvent (constructor with the preedit text and its QInputMethodEvent\Attribute list, setCommitString, commitString, preeditString; boxed as its class by a filter); wheel pixelDelta, angleDelta, position, globalPosition, source (Qt\MouseEventSource); context menu reason (QContextMenuEvent\Reason), pos, globalPos; constructors for the mouse, key, wheel and context-menu events, and a plain QEvent of a type Qt sends as one (window activation, the change notices, …; other types are a ValueError), sent with QCoreApplication::sendEvent
Hit tests, hints QApplication::widgetAt, QApplication::focusWidget, QApplication::activeModalWidget, QWidget::mapFromGlobal, QGuiApplication::styleHints() → QStyleHints mousePressAndHoldInterval, startDragDistance, mouseDoubleClickInterval, mouseDoubleClickDistance
QLayout, QLayoutItem setSpacing, spacing, setContentsMargins, count, removeWidget, indexOf, itemAt (a QLayoutItem: widget, layout, spacerItem)
QBoxLayout, QVBoxLayout, QHBoxLayout constructors (optional parent widget), addWidget(widget, stretch, alignment), insertWidget, addLayout, addStretch, setStretch, setAlignment; widgets added before the layout is installed are held until it is
QGridLayout constructor, addWidget(widget, row, column, rowSpan, columnSpan, alignment), addItem(QSpacerItem, …), rowCount, columnCount, setRowStretch, setColumnStretch, rowStretch, columnStretch, setHorizontalSpacing, setVerticalSpacing, itemAtPosition (a QLayoutItem)
QSpacerItem constructor (w, h, policies), changeSize, sizeHint
QLabel constructor, text, setText, alignment, setAlignment, wordWrap, setWordWrap, setScaledContents, pixmap, setPixmap, textFormat, setTextFormat, openExternalLinks, setOpenExternalLinks, textInteractionFlags, setTextInteractionFlags; signals linkActivated(QString), linkHovered(QString)
QDesktopServices openUrl(QUrl)
QAbstractButton, QPushButton, QCheckBox constructors (text, parent), text, setText, isCheckable, setCheckable, isChecked, setChecked, click, toggle, push button isDefault, setDefault; signals clicked(bool), toggled(bool)
QAbstractSlider, QSlider, QScrollBar QScrollBar constructor (orientation, parent), or a scroll area's verticalScrollBar, horizontalScrollBar; QSlider constructor (orientation, vertical by default as in Qt, parent), minimum, maximum, setRange, value, setValue, orientation, setOrientation; signal valueChanged(int)
QComboBox constructor, addItem, addItems, clear, count, currentIndex, setCurrentIndex, currentText, itemText, isEditable, setEditable, lineEdit, setCompleter, insertPolicy, setInsertPolicy, setEditText; signal currentIndexChanged(int)
QCompleter, QAbstractItemModel, QStringListModel constructor (model, parent), setWidget, completionMode, setCompletionMode, setCaseSensitivity, completionPrefix, setCompletionPrefix, complete(rect), popup; abstract, made through QStringListModel; constructor, setStringList, stringList
QToolButton, QIcon, QActionGroup constructor, setMenu (the menu is not taken: its owner outlives the button), menu, popupMode, setPopupMode, toolButtonStyle, setToolButtonStyle, autoRaise, setAutoRaise, showMenu; value: constructor (QPixmap), isNull; constructor, addAction, checkedAction
Button icons, tab insert, wheel phase, widget points QAbstractButton setIcon, iconSize, setIconSize; QPushButton isFlat, setFlat; QTabWidget insertTab; QWheelEvent phase; QWidget mapToGlobal, accessibleName, setAccessibleName
QLineEdit constructor (text, parent), text, setText, placeholderText, setPlaceholderText, echoMode, setEchoMode, isReadOnly, setReadOnly, cut, copy, paste, selectAll, undo, redo, selectedText; signals textChanged(QString), returnPressed()
QPlainTextEdit constructor, toPlainText, setPlainText, isReadOnly, setReadOnly, cut, copy, paste, selectAll, undo, redo, document, textCursor, setTextCursor, ensureCursorVisible, setExtraSelections, extraSelections, lineWrapMode, setLineWrapMode, textInteractionFlags, setTextInteractionFlags, verticalScrollBar, horizontalScrollBar, viewport; signals textChanged(), cursorPositionChanged()
QTextDocument a text edit's: findBlockByNumber (Qt's invalid block past the end), blockCount, characterCount, markContentsDirty
QTextLayout a block's (QTextBlock::layout, held by a cursor at the block's start): setFormats, formats of QTextLayout\FormatRange (public start, length, format)
QColor, QBrush, QPalette, QTextCharFormat, QTextCursor, QTextBlock, QTextEdit\ExtraSelection values: QColor (isValid), QBrush (colour, Qt\BrushStyle), QPalette (a copy from QGuiApplication::palette(); color by QPalette\ColorRole, whose ACCENT is Qt 6.6's), QTextCharFormat (setForeground, setBackground, setProperty, boolProperty, hasProperty; QTextFormat::FULL_WIDTH_SELECTION), QTextCursor (UTF-16 positions, setPosition, movePosition by QTextCursor\MoveOperation, isNull), QTextBlock (isValid, layout), QTextEdit\ExtraSelection (public cursor, format)
QFontDatabase systemFont
QDateEdit, QCalendarWidget constructor, date, setDate, minimumDate, setMinimumDate (QDate), setCalendarPopup, calendarWidget, setDisplayFormat; signal dateChanged(QDate) hands a QDate over
QProgressBar constructor, minimum, maximum, setRange, value, setValue, setTextVisible, reset
QFrame, QScrollArea constructors, frameShape, setFrameShape, setFrameShadow; setWidget, widget, setWidgetResizable, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy
QSplitter, QSplitterHandle, QTabWidget QSplitter(Qt\Orientation), orientation/setOrientation, addWidget, insertWidget (outside 0..count appends), count, widget, indexOf, setSizes/sizes, handleWidth/setHandleWidth, opaqueResize/setOpaqueResize, childrenCollapsible/setChildrenCollapsible, setStretchFactor, handle; handle splitter; signal splitterMoved(int,int). addTab, removeTab, indexOf, count, currentIndex/setCurrentIndex, currentWidget, setTabText/tabText, widget, documentMode/setDocumentMode (Qt's own index handling: a bad tab index does nothing, tabText gives ""); signal currentChanged(int)
QAbstractItemView, QTableWidget, QTableWidgetItem setSelectionBehavior, setSelectionMode, setEditTriggers, NO_EDIT_TRIGGERS; constructor (rows, columns, parent), rowCount, setRowCount, columnCount, setColumnCount, setHorizontalHeaderLabels, horizontalHeaderItem, selectedItems, clearSelection, setItem, item, clearContents, currentRow, selectRow; item constructor, text, setText, row; signals itemSelectionChanged(), cellClicked(int,int)
QTreeWidget, QTreeWidgetItem constructor (parent), columnCount, setColumnCount, setHeaderLabels, addTopLevelItem, clear, currentItem, setCurrentItem, scrollToItem (QAbstractItemView\ScrollHint), expandItem, collapseItem, selectedItems; item constructor (type), text/setText, foreground/setForeground (QBrush), data/setData (column, role, value as QVariant holds it), addChild, childCount, child, parent, isExpanded/setExpanded, childIndicatorPolicy/setChildIndicatorPolicy; signals currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*), itemSelectionChanged(), itemActivated(QTreeWidgetItem*,int), itemExpanded(QTreeWidgetItem*), itemCollapsed(QTreeWidgetItem*), their items as the wrappers PHP holds
QFont, QPixmap values: constructor (family, point size, weight, italic), family, setFamily, pointSizeF, setPointSizeF, weight, setWeight; constructor, load, isNull, width, height, scaled, devicePixelRatio, setDevicePixelRatio
QImage, QByteArray QImage borrows the buffer at an address (a QByteArray's or a framebuffer's pointer(), trusted), with Qt's cleanup function and info: constructor (data, width, height, bytes per line, QImage\Format, cleanup, info), isNull, width, height, format, copy; QPixmap::fromImage turns it into a pixmap. QByteArray(data, size), size, pointer
QPoint, QPointF, QSize, QRect, QDate, QKeySequence values, as Qt's own: points, sizes and rects in and out of the widget, event and layout calls; QDate (toString, fromString by Qt\DateFormat); QKeySequence (toString, fromString by QKeySequence\SequenceFormat)
QUrl value: constructor (QUrl\ParsingMode), fromLocalFile, toString(options), isValid
QAudioOutput constructor, setMuted, isMuted, setVolume, volume
QMediaPlayer constructor, setVideoOutput, setAudioOutput, setSource, source, play, pause, stop, position, duration, setPosition, playbackState, mediaStatus, setLoops, INFINITE_LOOPS, errorString, hasVideo, isAvailable; signals playbackStateChanged, mediaStatusChanged, errorOccurred, positionChanged
QVideoWidget constructor

Enums: QEventLoop\ProcessEventsFlag, Qt\TimerType, QSocketNotifier\Type, QAction\MenuRole, Qt\Orientation, Qt\AspectRatioMode, Qt\ScrollBarPolicy, Qt\ToolButtonStyle, Qt\CaseSensitivity, QComboBox\InsertPolicy, QCompleter\CompletionMode, QToolButton\ToolButtonPopupMode, QSizePolicy\Policy, QLineEdit\EchoMode, QFont\Weight, QTextCursor\MoveMode, QTextCursor\MoveOperation, QPlainTextEdit\LineWrapMode, QFontDatabase\SystemFont, Qt\TextInteractionFlag, QFrame\Shape, QFrame\Shadow, QAbstractItemView\SelectionBehavior, QAbstractItemView\SelectionMode, QAbstractItemView\ScrollHint, QTreeWidgetItem\ChildIndicatorPolicy, QMediaPlayer\PlaybackState, QMediaPlayer\MediaStatus, QMediaPlayer\Error, and, generated from the Qt headers by scripts/gen-enum.php, QEvent\Type, Qt\WidgetAttribute, Qt\AlignmentFlag, Qt\ItemDataRole, Qt\ScrollPhase, Qt\MouseEventSource and Qt\Key (KEY_0 … KEY_9 keep the prefix; DEAD_a / DEAD_A keep the case that tells them apart). QFlags parameters (alignment) take the enum or an OR'd int. Function: qVersion(). The stubs in stubs/ are the full declaration.

Signals connect by the signature SIGNAL() spells, and the callable receives the signal's arguments:

Coverage

SUPPORT.md lists every public member function name of the classes QtCore, QtGui and QtWidgets declare (signals, operators, deprecated members and the value classes the extension marshals as PHP strings and arrays left out; overloads count once), each marked bound or not; the API badge is computed from it. Regenerate both after a binding change, and check them:

Example

Install

Or with PIE: pie install php-io-extensions/qt.

Test

tests/VideoTest.php plays tests/fixtures/clip.mp4 (1.2 s, silent) through the platform media backend: AVFoundation on macOS, the FFmpeg plugin of libqt6multimedia6 on Debian.

On Linux over SSH, export the session's DISPLAY (and WAYLAND_DISPLAY when the qt6-wayland platform plugin is installed) first. Design notes live in the OKF bundle under .okf/.

License

MIT


All versions of qt with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-io-extensions/qt contains the following files

Loading the files please wait ...