Fix tray visibility and message reception issues
Some checks failed
build / build-win64 (push) Waiting to run
build / build-macos (push) Waiting to run
build / build-pip (push) Failing after 16s

- Disable sound initialization to prevent hanging
- Add missing import re in utils.py
- Fix settings loading for QSettings
- Update file paths to use PROJECT_ROOT
- Revert to working API paths and listener from commit efdc63e
This commit is contained in:
kdusek
2025-12-07 22:39:07 +01:00
parent 7b695d7b7f
commit 5138303016
4060 changed files with 579123 additions and 23 deletions

View File

@@ -0,0 +1,6 @@
# Automatically generated configuration for PyQt6.QtQml.
sip-version = "6.14.0"
sip-abi-version = "13.8"
module-tags = ["Qt_6_10_0", "Linux"]
module-disabled-features = []

View File

@@ -0,0 +1,74 @@
// QtQmlmod.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%Module(name=PyQt6.QtQml, keyword_arguments="Optional", use_limited_api=True)
%Import QtCore/QtCoremod.sip
%Import QtNetwork/QtNetworkmod.sip
%Copying
Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
This file is part of PyQt6.
This file may be used under the terms of the GNU General Public License
version 3.0 as published by the Free Software Foundation and appearing in
the file LICENSE included in the packaging of this file. Please review the
following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you do not wish to use this file under the terms of the GPL version 3.0
then you may purchase a commercial license. For more information contact
info@riverbankcomputing.com.
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%End
%DefaultSupertype PyQt6.sip.simplewrapper
%Include qqml.sip
%Include qjsengine.sip
%Include qjsmanagedvalue.sip
%Include qjsprimitivevalue.sip
%Include qjsvalue.sip
%Include qjsvalueiterator.sip
%Include qqmlabstracturlinterceptor.sip
%Include qqmlapplicationengine.sip
%Include qqmlcomponent.sip
%Include qqmlcontext.sip
%Include qqmlengine.sip
%Include qqmlerror.sip
%Include qqmlexpression.sip
%Include qqmlextensionplugin.sip
%Include qqmlfileselector.sip
%Include qqmlincubator.sip
%Include qqmllist.sip
%Include qqmlnetworkaccessmanagerfactory.sip
%Include qqmlparserstatus.sip
%Include qqmlproperty.sip
%Include qqmlpropertymap.sip
%Include qqmlpropertyvaluesource.sip
%Include qqmlscriptstring.sip
%Include qmlregistertype.sip
%Include qpyqmllistproperty.sip
%Include qmlattachedpropertiesobject.sip

View File

@@ -0,0 +1,208 @@
// qjsengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleCode
#include <qjsengine.h>
%End
class QJSEngine : public QObject
{
%TypeHeaderCode
#include <qjsengine.h>
%End
%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
{sipName_QJSEngine, &sipType_QJSEngine, 9, 1},
{sipName_QQmlComponent, &sipType_QQmlComponent, -1, 2},
{sipName_QQmlContext, &sipType_QQmlContext, -1, 3},
{sipName_QQmlEngineExtensionPlugin, &sipType_QQmlEngineExtensionPlugin, -1, 4},
{sipName_QQmlExpression, &sipType_QQmlExpression, -1, 5},
{sipName_QQmlExtensionPlugin, &sipType_QQmlExtensionPlugin, -1, 6},
{sipName_QQmlFileSelector, &sipType_QQmlFileSelector, -1, 7},
{sipName_QQmlImageProviderBase, &sipType_QQmlImageProviderBase, -1, 8},
{sipName_QQmlPropertyMap, &sipType_QQmlPropertyMap, -1, -1},
{sipName_QQmlEngine, &sipType_QQmlEngine, 10, -1},
{sipName_QQmlApplicationEngine, &sipType_QQmlApplicationEngine, -1, -1},
};
int i = 0;
sipType = NULL;
do
{
struct class_graph *cg = &graph[i];
if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End
public:
QJSEngine();
explicit QJSEngine(QObject *parent /TransferThis/);
virtual ~QJSEngine();
QJSValue globalObject() const;
QJSValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1, SIP_PYLIST exceptionStackTrace /AllowNone,TypeHint="List[str]"/ = 0) /ReleaseGIL/;
%MethodCode
QStringList *st;
st = (a3 ? new QStringList() : SIP_NULLPTR);
Py_BEGIN_ALLOW_THREADS
sipRes = new QJSValue(sipCpp->evaluate(*a0, *a1, a2, st));
Py_END_ALLOW_THREADS
if (st)
{
for (qsizetype i = 0; i < st->size(); ++i)
{
QString *s = new QString(st->at(i));
PyObject *s_obj = sipConvertFromNewType(s, sipType_QString, SIP_NULLPTR);
if (s_obj)
{
if (PyList_Append(a3, s_obj) < 0)
{
Py_DECREF(s_obj);
sipIsErr = 1;
break;
}
Py_DECREF(s_obj);
}
else
{
delete s;
sipIsErr = 1;
break;
}
}
if (sipIsErr)
{
delete sipRes;
sipRes = SIP_NULLPTR;
}
delete st;
}
%End
QJSValue newObject();
QJSValue newArray(uint length = 0);
QJSValue newQObject(QObject *object /Transfer/);
void collectGarbage();
enum Extension /BaseType=Flag/
{
TranslationExtension,
ConsoleExtension,
GarbageCollectionExtension,
AllExtensions,
};
typedef QFlags<QJSEngine::Extension> Extensions;
void installExtensions(QJSEngine::Extensions extensions, const QJSValue &object = QJSValue());
QJSValue newQMetaObject(const QMetaObject *metaObject);
QJSValue importModule(const QString &fileName);
QJSValue newErrorObject(QJSValue::ErrorType errorType, const QString &message = QString());
void throwError(const QString &message);
%If (Qt_6_1_0 -)
void throwError(const QJSValue &error);
%End
void throwError(QJSValue::ErrorType errorType, const QString &message = QString());
void setInterrupted(bool interrupted);
bool isInterrupted() const;
QString uiLanguage() const;
void setUiLanguage(const QString &language);
enum ObjectOwnership
{
CppOwnership,
JavaScriptOwnership,
};
static void setObjectOwnership(QObject * /GetWrapper/, QJSEngine::ObjectOwnership);
%MethodCode
QJSEngine::ObjectOwnership old = QJSEngine::objectOwnership(a0);
QJSEngine::setObjectOwnership(a0, a1);
if (old != a1 && !a0->parent())
{
if (old == QJSEngine::CppOwnership)
sipTransferTo(a0Wrapper, Py_None);
else
sipTransferBack(a0Wrapper);
}
%End
static QJSEngine::ObjectOwnership objectOwnership(QObject *);
%If (Qt_6_1_0 -)
bool hasError() const;
%End
%If (Qt_6_1_0 -)
QJSValue catchError();
%End
signals:
void uiLanguageChanged();
public:
%If (Qt_6_2_0 -)
bool registerModule(const QString &moduleName, const QJSValue &value);
%End
%If (Qt_6_2_0 -)
QJSValue newSymbol(const QString &name);
%End
%If (Qt_6_5_0 -)
QJSValue toScriptValue(const QVariant &value);
%End
%If (Qt_6_5_0 -)
QJSManagedValue toManagedValue(const QVariant &value);
%End
%If (Qt_6_5_0 -)
QJSPrimitiveValue toPrimitiveValue(const QVariant &value);
%End
};
QJSEngine *qjsEngine(const QObject *);
%ModuleHeaderCode
#include "qpyqml_api.h"
%End
%PostInitialisationCode
qpyqml_post_init(sipModuleDict);
%End

View File

@@ -0,0 +1,99 @@
// qjsmanagedvalue.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_1_0 -)
class QJSManagedValue /NoDefaultCtors/
{
%TypeHeaderCode
#include <qjsmanagedvalue.h>
%End
public:
enum Type
{
Undefined,
Boolean,
Number,
String,
Object,
Symbol,
Function,
};
QJSManagedValue();
QJSManagedValue(QJSValue value, QJSEngine *engine);
QJSManagedValue(const QJSPrimitiveValue &value, QJSEngine *engine);
QJSManagedValue(const QString &string, QJSEngine *engine);
QJSManagedValue(const QVariant &variant, QJSEngine *engine);
~QJSManagedValue();
bool equals(const QJSManagedValue &other) const;
bool strictlyEquals(const QJSManagedValue &other) const;
QJSEngine *engine() const;
QJSManagedValue prototype() const;
void setPrototype(const QJSManagedValue &prototype);
QJSManagedValue::Type type() const;
bool isUndefined() const;
bool isBoolean() const;
bool isNumber() const;
bool isString() const;
bool isObject() const;
bool isSymbol() const;
bool isFunction() const;
bool isInteger() const;
bool isNull() const;
bool isRegularExpression() const;
bool isArray() const;
bool isUrl() const;
bool isVariant() const;
bool isQObject() const;
bool isQMetaObject() const;
bool isDate() const;
bool isError() const;
QString toString() const;
double toNumber() const;
bool toBoolean() const;
QJSPrimitiveValue toPrimitive() const;
QJSValue toJSValue() const;
QVariant toVariant() const;
int toInteger() const;
QRegularExpression toRegularExpression() const;
QUrl toUrl() const;
QObject *toQObject() const;
const QMetaObject *toQMetaObject() const;
QDateTime toDateTime() const;
bool hasProperty(const QString &name) const;
bool hasOwnProperty(const QString &name) const;
QJSValue property(const QString &name) const;
void setProperty(const QString &name, const QJSValue &value);
bool deleteProperty(const QString &name);
bool hasProperty(quint32 arrayIndex) const;
bool hasOwnProperty(quint32 arrayIndex) const;
QJSValue property(quint32 arrayIndex) const;
void setProperty(quint32 arrayIndex, const QJSValue &value);
bool deleteProperty(quint32 arrayIndex);
QJSValue call(const QJSValueList &arguments = {}) const;
QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &arguments = {}) const;
QJSValue callAsConstructor(const QJSValueList &arguments = {}) const;
};
%End

View File

@@ -0,0 +1,123 @@
// qjsprimitivevalue.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_1_0 -)
struct QJSPrimitiveUndefined
{
%TypeHeaderCode
#include <qjsprimitivevalue.h>
%End
};
%End
%If (Qt_6_1_0 -)
struct QJSPrimitiveNull
{
%TypeHeaderCode
#include <qjsprimitivevalue.h>
%End
};
%End
%If (Qt_6_1_0 -)
class QJSPrimitiveValue
{
%TypeHeaderCode
#include <qjsprimitivevalue.h>
%End
public:
enum Type : quint8
{
Undefined,
Null,
Boolean,
Integer,
Double,
String,
};
QJSPrimitiveValue();
QJSPrimitiveValue(QJSPrimitiveUndefined undefined);
QJSPrimitiveValue(QJSPrimitiveNull null);
QJSPrimitiveValue(bool value /Constrained/);
QJSPrimitiveValue(int value /Constrained/);
QJSPrimitiveValue(double value /Constrained/);
QJSPrimitiveValue(QString string);
QJSPrimitiveValue::Type type() const;
bool toBoolean() const;
int toInteger() const;
double toDouble() const;
QString toString() const;
bool strictlyEquals(const QJSPrimitiveValue &other) const;
bool equals(const QJSPrimitiveValue &other) const;
%If (Qt_6_2_0 -)
QJSPrimitiveValue operator+();
%End
%If (Qt_6_2_0 -)
QJSPrimitiveValue operator-();
%End
%If (Qt_6_6_0 -)
QMetaType metaType() const;
%End
%If (Qt_6_6_0 -)
void *data();
%End
};
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue operator+(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue operator-(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue operator*(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue operator/(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue operator%(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator==(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator!=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator<(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator>(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator<=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End
%If (Qt_6_1_0 -)
bool operator>=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
%End

View File

@@ -0,0 +1,117 @@
// qjsvalue.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
typedef QList<QJSValue> QJSValueList;
class QJSValue /TypeHintIn="Union[QJSValue, QJSValue.SpecialValue, bool, int, float, QString]"/
{
%TypeHeaderCode
#include <qjsvalue.h>
%End
%ConvertToTypeCode
if (!sipIsErr)
return qpyqml_canConvertTo_QJSValue(sipPy);
return qpyqml_convertTo_QJSValue(sipPy, sipTransferObj, sipCppPtr, sipIsErr);
%End
public:
enum SpecialValue
{
NullValue,
UndefinedValue,
};
%If (Qt_6_1_0 -)
enum ObjectConversionBehavior
{
ConvertJSObjects,
RetainJSObjects,
};
%End
QJSValue(QJSValue::SpecialValue value /Constrained/ = QJSValue::UndefinedValue);
QJSValue(const QJSValue &other);
~QJSValue();
bool isBool() const;
bool isNumber() const;
bool isNull() const;
bool isString() const;
bool isUndefined() const;
bool isVariant() const;
bool isQObject() const;
bool isObject() const;
bool isDate() const;
bool isRegExp() const;
bool isArray() const;
bool isError() const;
%If (Qt_6_2_0 -)
bool isUrl() const;
%End
QString toString() const;
double toNumber() const;
qint32 toInt() const;
quint32 toUInt() const;
bool toBool() const;
QVariant toVariant() const;
%If (Qt_6_1_0 -)
QVariant toVariant(QJSValue::ObjectConversionBehavior behavior) const;
%End
%If (Qt_6_1_0 -)
QJSPrimitiveValue toPrimitive() const;
%End
QObject *toQObject() const;
QDateTime toDateTime() const;
bool equals(const QJSValue &other) const;
bool strictlyEquals(const QJSValue &other) const;
QJSValue prototype() const;
void setPrototype(const QJSValue &prototype);
QJSValue property(const QString &name) const;
void setProperty(const QString &name, const QJSValue &value);
bool hasProperty(const QString &name) const;
bool hasOwnProperty(const QString &name) const;
QJSValue property(quint32 arrayIndex) const;
void setProperty(quint32 arrayIndex, const QJSValue &value);
bool deleteProperty(const QString &name);
bool isCallable() const;
QJSValue call(const QJSValueList &args = QJSValueList()) const;
QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &args = QJSValueList()) const;
QJSValue callAsConstructor(const QJSValueList &args = QJSValueList()) const;
enum ErrorType
{
GenericError,
EvalError,
RangeError,
ReferenceError,
SyntaxError,
TypeError,
URIError,
};
QJSValue::ErrorType errorType() const;
};
QDataStream &operator<<(QDataStream &, const QJSValue &) /ReleaseGIL/;
QDataStream &operator>>(QDataStream &, QJSValue & /Constrained/) /ReleaseGIL/;

View File

@@ -0,0 +1,39 @@
// qjsvalueiterator.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QJSValueIterator
{
%TypeHeaderCode
#include <qjsvalueiterator.h>
%End
public:
QJSValueIterator(const QJSValue &value);
~QJSValueIterator();
bool hasNext() const;
bool next();
QString name() const;
QJSValue value() const;
private:
QJSValueIterator(const QJSValueIterator &);
};

View File

@@ -0,0 +1,42 @@
// This is the SIP specification of the qmlAttachedPropertiesObject() function.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleHeaderCode
#include <qqml.h>
%End
QObject *qmlAttachedPropertiesObject(SIP_PYTYPE, QObject *object,
bool create = true);
%MethodCode
QObject *proxy = qpyqml_find_proxy_for(a1);
if (!proxy)
{
sipError = sipErrorFail;
}
else
{
const QMetaObject *mo = pyqt6_qtqml_get_qmetaobject((PyTypeObject *)a0);
sipRes = qmlAttachedPropertiesObject(proxy,
qmlAttachedPropertiesFunction(nullptr, mo), a2);
}
%End

View File

@@ -0,0 +1,82 @@
// This is the SIP specification of the template versions of qmlRegisterType()
// and related functions.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleHeaderCode
#include <qpyqml_api.h>
%End
%ModuleCode
// Imports from QtCore.
pyqt6_qtqml_get_qmetaobject_t pyqt6_qtqml_get_qmetaobject;
%End
%PostInitialisationCode
// Imports from QtCore.
pyqt6_qtqml_get_qmetaobject = (pyqt6_qtqml_get_qmetaobject_t)sipImportSymbol(
"pyqt6_get_qmetaobject");
Q_ASSERT(pyqt6_qtqml_get_qmetaobject);
%End
int qmlRegisterRevision(SIP_PYTYPE, const char *uri, int major, int minor,
SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_library_type((PyTypeObject *)a0, a1, a2, a3, nullptr, (PyTypeObject *)a4)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterSingletonInstance(const char *uri, int major, int minor,
const char *typeName, QObject *cppObject);
int qmlRegisterSingletonType(SIP_PYTYPE, const char *uri, int major, int minor,
SIP_PYCALLABLE factory /TypeHint="Callable[[QQmlEngine, QJSEngine], Any]"/,
const char *name = 0);
%MethodCode
if ((sipRes = qpyqml_register_singleton_type((PyTypeObject *)a0, a1, a2, a3, a5, a4)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterType(SIP_PYTYPE, const char *uri, int major, int minor,
const char *name = 0, SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_library_type((PyTypeObject *)a0, a1, a2, a3, a4, (PyTypeObject *)a5)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterAnonymousType(SIP_PYTYPE, const char *uri, int major);
%MethodCode
if ((sipRes = qpyqml_register_anonymous_type((PyTypeObject *)a0, a1, a2)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterUncreatableType(SIP_PYTYPE, const char *uri, int major,
int minor, const QString &reason, const char *qmlName = 0);
%MethodCode
if ((sipRes = qpyqml_register_uncreatable_type((PyTypeObject *)a0, a1, a2, a3, a5, *a4)) < 0)
sipError = sipErrorFail;
%End

View File

@@ -0,0 +1,40 @@
// This is the SIP specification of the QQmlListProperty mapped type.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%MappedType QQmlListProperty<QObject> /TypeHint="QQmlListProperty"/
{
%TypeHeaderCode
#include "qpyqmllistpropertywrapper.h"
%End
%ConvertFromTypeCode
return qpyqml_QQmlListPropertyWrapper_New(sipCpp, 0);
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
return PyObject_IsInstance(sipPy, (PyObject *)qpyqml_QQmlListPropertyWrapper_TypeObject);
*sipCppPtr = ((qpyqml_QQmlListPropertyWrapper *)sipPy)->qml_list_property;
// It isn't a temporary copy.
return 0;
%End
};

View File

@@ -0,0 +1,36 @@
// qqml.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleCode
#include <qqml.h>
%End
void qmlClearTypeRegistrations();
int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &message);
int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &reason);
bool qmlProtectModule(const char *uri, int majVersion);
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor);
int qmlRegisterSingletonType(const QUrl &url, const char *uri, int versionMajor, int versionMinor, const char *qmlName);
int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, int versionMinor, const char *qmlName);
int qmlTypeId(const char *uri, int versionMajor, int versionMinor, const char *qmlName);
QQmlContext *qmlContext(const QObject *);
QQmlEngine *qmlEngine(const QObject *);

View File

@@ -0,0 +1,41 @@
// qqmlabstracturlinterceptor.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlAbstractUrlInterceptor
{
%TypeHeaderCode
#include <qqmlabstracturlinterceptor.h>
%End
public:
enum DataType
{
QmlFile,
JavaScriptFile,
QmldirFile,
UrlString,
};
QQmlAbstractUrlInterceptor();
virtual ~QQmlAbstractUrlInterceptor();
virtual QUrl intercept(const QUrl &path, QQmlAbstractUrlInterceptor::DataType type) = 0;
};

View File

@@ -0,0 +1,54 @@
// qqmlapplicationengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlApplicationEngine : public QQmlEngine
{
%TypeHeaderCode
#include <qqmlapplicationengine.h>
%End
public:
QQmlApplicationEngine(QObject *parent /TransferThis/ = 0);
QQmlApplicationEngine(const QUrl &url, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlApplicationEngine(const QString &filePath, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
%If (Qt_6_5_0 -)
QQmlApplicationEngine(QAnyStringView uri, QAnyStringView typeName, QObject *parent /TransferThis/ = 0);
%End
virtual ~QQmlApplicationEngine();
QList<QObject *> rootObjects() const;
public slots:
void load(const QUrl &url) /ReleaseGIL/;
void load(const QString &filePath) /ReleaseGIL/;
void loadData(const QByteArray &data, const QUrl &url = QUrl()) /ReleaseGIL/;
void setExtraFileSelectors(const QStringList &extraFileSelectors);
void setInitialProperties(const QVariantMap &initialProperties);
%If (Qt_6_5_0 -)
void loadFromModule(QAnyStringView uri, QAnyStringView typeName);
%End
signals:
void objectCreated(QObject *object, const QUrl &url);
%If (Qt_6_4_0 -)
void objectCreationFailed(const QUrl &url);
%End
};

View File

@@ -0,0 +1,91 @@
// qqmlcomponent.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlComponent : public QObject
{
%TypeHeaderCode
#include <qqmlcomponent.h>
%End
public:
enum CompilationMode
{
PreferSynchronous,
Asynchronous,
};
QQmlComponent(QQmlEngine *, QObject *parent /TransferThis/ = 0);
QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QString &fileName, QQmlComponent::CompilationMode mode, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QUrl &url, QQmlComponent::CompilationMode mode, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
%If (Qt_6_5_0 -)
QQmlComponent(QQmlEngine *engine, QAnyStringView uri, QAnyStringView typeName, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
%End
%If (Qt_6_5_0 -)
QQmlComponent(QQmlEngine *engine, QAnyStringView uri, QAnyStringView typeName, QQmlComponent::CompilationMode mode, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
%End
QQmlComponent(QObject *parent /TransferThis/ = 0);
virtual ~QQmlComponent();
enum Status
{
Null,
Ready,
Loading,
Error,
};
QQmlComponent::Status status() const;
%If (Qt_6_5_0 -)
bool isBound() const;
%End
bool isNull() const;
bool isReady() const;
bool isError() const;
bool isLoading() const;
QList<QQmlError> errors() const;
qreal progress() const;
QUrl url() const;
virtual QObject *create(QQmlContext *context = 0) /TransferBack/;
QObject *createWithInitialProperties(const QVariantMap &initialProperties, QQmlContext *context = 0) /TransferBack/;
virtual QObject *beginCreate(QQmlContext *) /TransferBack/;
virtual void completeCreate();
void create(QQmlIncubator &, QQmlContext *context = 0, QQmlContext *forContext = 0);
QQmlContext *creationContext() const;
public slots:
void loadUrl(const QUrl &url) /ReleaseGIL/;
void loadUrl(const QUrl &url, QQmlComponent::CompilationMode mode) /ReleaseGIL/;
void setData(const QByteArray &, const QUrl &baseUrl);
%If (Qt_6_5_0 -)
void loadFromModule(QAnyStringView uri, QAnyStringView typeName, QQmlComponent::CompilationMode mode = QQmlComponent::PreferSynchronous);
%End
signals:
void statusChanged(QQmlComponent::Status);
void progressChanged(qreal);
public:
QQmlEngine *engine() const;
void setInitialProperties(QObject *component, const QVariantMap &properties);
};

View File

@@ -0,0 +1,60 @@
// qqmlcontext.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlContext : public QObject
{
%TypeHeaderCode
#include <qqmlcontext.h>
%End
public:
QQmlContext(QQmlEngine *engine, QObject *parent /TransferThis/ = 0);
QQmlContext(QQmlContext *parentContext, QObject *parent /TransferThis/ = 0);
virtual ~QQmlContext();
bool isValid() const;
QQmlEngine *engine() const;
QQmlContext *parentContext() const;
QObject *contextObject() const;
void setContextObject(QObject *);
QVariant contextProperty(const QString &) const;
void setContextProperty(const QString &, QObject *);
void setContextProperty(const QString &, const QVariant &);
QString nameForObject(const QObject *) const;
QUrl resolvedUrl(const QUrl &) const;
void setBaseUrl(const QUrl &);
QUrl baseUrl() const;
struct PropertyPair
{
%TypeHeaderCode
#include <qqmlcontext.h>
%End
QString name;
QVariant value;
};
void setContextProperties(const QList<QQmlContext::PropertyPair> &properties);
%If (Qt_6_2_0 -)
QObject *objectForName(const QString &) const;
%End
};

View File

@@ -0,0 +1,189 @@
// qqmlengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlEngine : public QJSEngine
{
%TypeHeaderCode
#include <qqmlengine.h>
%End
public:
explicit QQmlEngine(QObject *parent /TransferThis/ = 0);
virtual ~QQmlEngine();
QQmlContext *rootContext() const;
void clearComponentCache();
void trimComponentCache();
QStringList importPathList() const;
void setImportPathList(const QStringList &paths);
void addImportPath(const QString &dir);
QStringList pluginPathList() const;
void setPluginPathList(const QStringList &paths);
void addPluginPath(const QString &dir);
bool importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors /GetWrapper/);
%MethodCode
int orig_size = (a2 ? a2->size() : 0);
sipRes = sipCpp->importPlugin(*a0, *a1, a2);
if (a2)
{
for (int i = a2->size(); i > orig_size; --i)
{
QQmlError *new_error = new QQmlError(a2->at(i - orig_size - 1));
PyObject *new_error_obj = sipConvertFromNewType(new_error, sipType_QQmlError, 0);
if (!new_error_obj)
{
delete new_error;
sipError = sipErrorFail;
break;
}
if (PyList_Insert(a2Wrapper, 0, new_error_obj) < 0)
{
Py_DECREF(new_error_obj);
sipError = sipErrorFail;
break;
}
Py_DECREF(new_error_obj);
}
}
%End
void setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory * /KeepReference/);
QQmlNetworkAccessManagerFactory *networkAccessManagerFactory() const;
QNetworkAccessManager *networkAccessManager() const;
void addImageProvider(const QString &id, QQmlImageProviderBase * /Transfer/);
QQmlImageProviderBase *imageProvider(const QString &id) const;
void removeImageProvider(const QString &id);
void setIncubationController(QQmlIncubationController * /KeepReference/);
QQmlIncubationController *incubationController() const;
void setOfflineStoragePath(const QString &dir);
QString offlineStoragePath() const;
QUrl baseUrl() const;
void setBaseUrl(const QUrl &);
bool outputWarningsToStandardError() const;
void setOutputWarningsToStandardError(bool);
static QQmlContext *contextForObject(const QObject *);
static void setContextForObject(QObject *, QQmlContext *);
public slots:
void retranslate();
protected:
virtual bool event(QEvent *);
signals:
void quit();
void warnings(const QList<QQmlError> &warnings);
void exit(int retCode);
public:
QString offlineStorageDatabaseFilePath(const QString &databaseName) const;
SIP_PYOBJECT singletonInstance(int qmlTypeId) /TypeHint="QObject"/;
%MethodCode
QJSValue instance = sipCpp->singletonInstance<QJSValue>(a0);
if (instance.isQObject())
{
sipRes = sipConvertFromType(instance.toQObject(), sipType_QObject, NULL);
if (!sipRes)
sipError = sipErrorFail;
}
else
{
sipRes = Py_None;
Py_INCREF(sipRes);
}
%End
%If (Qt_6_5_0 -)
SIP_PYOBJECT singletonInstance(QAnyStringView moduleName, QAnyStringView typeName) /TypeHint="QObject"/;
%MethodCode
QJSValue instance = sipCpp->singletonInstance<QJSValue>(*a0, *a1);
if (instance.isQObject())
{
sipRes = sipConvertFromType(instance.toQObject(), sipType_QObject, NULL);
if (!sipRes)
sipError = sipErrorFail;
}
else
{
sipRes = Py_None;
Py_INCREF(sipRes);
}
%End
%End
void addUrlInterceptor(QQmlAbstractUrlInterceptor *urlInterceptor);
void removeUrlInterceptor(QQmlAbstractUrlInterceptor *urlInterceptor);
QUrl interceptUrl(const QUrl &url, QQmlAbstractUrlInterceptor::DataType type) const;
%If (Qt_6_2_0 -)
QList<QQmlAbstractUrlInterceptor *> urlInterceptors() const;
%End
%If (Qt_6_3_0 -)
void clearSingletons();
%End
signals:
%If (Qt_6_5_0 -)
void offlineStoragePathChanged();
%End
public:
%If (Qt_6_6_0 -)
void markCurrentFunctionAsTranslationBinding();
%End
};
class QQmlImageProviderBase : public QObject
{
%TypeHeaderCode
#include <qqmlengine.h>
%End
public:
enum ImageType
{
Image,
Pixmap,
Texture,
ImageResponse,
};
enum Flag /BaseType=Flag/
{
ForceAsynchronousImageLoading,
};
typedef QFlags<QQmlImageProviderBase::Flag> Flags;
virtual ~QQmlImageProviderBase();
virtual QQmlImageProviderBase::ImageType imageType() const = 0;
virtual QQmlImageProviderBase::Flags flags() const = 0;
private:
QQmlImageProviderBase();
};

View File

@@ -0,0 +1,52 @@
// qqmlerror.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlError
{
%TypeHeaderCode
#include <qqmlerror.h>
%End
public:
QQmlError();
QQmlError(const QQmlError &);
~QQmlError();
bool isValid() const;
QUrl url() const;
void setUrl(const QUrl &);
QString description() const;
void setDescription(const QString &);
int line() const;
void setLine(int);
int column() const;
void setColumn(int);
QString toString() const;
QObject *object() const;
void setObject(QObject *);
QtMsgType messageType() const;
void setMessageType(QtMsgType messageType);
%If (Qt_6_4_0 -)
void swap(QQmlError &other);
%End
};
bool operator==(const QQmlError &a, const QQmlError &b);

View File

@@ -0,0 +1,52 @@
// qqmlexpression.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlExpression : public QObject
{
%TypeHeaderCode
#include <qqmlexpression.h>
%End
public:
QQmlExpression();
QQmlExpression(QQmlContext *, QObject *, const QString &, QObject *parent /TransferThis/ = 0);
QQmlExpression(const QQmlScriptString &, QQmlContext *context = 0, QObject *scope = 0, QObject *parent /TransferThis/ = 0);
virtual ~QQmlExpression();
QQmlEngine *engine() const;
QQmlContext *context() const;
QString expression() const;
void setExpression(const QString &);
bool notifyOnValueChanged() const;
void setNotifyOnValueChanged(bool);
QString sourceFile() const;
int lineNumber() const;
int columnNumber() const;
void setSourceLocation(const QString &fileName, int line, int column = 0);
QObject *scopeObject() const;
bool hasError() const;
void clearError();
QQmlError error() const;
QVariant evaluate(bool *valueIsUndefined = 0) /ReleaseGIL/;
signals:
void valueChanged();
};

View File

@@ -0,0 +1,47 @@
// qqmlextensionplugin.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlExtensionPlugin : QObject
{
%TypeHeaderCode
#include <qqmlextensionplugin.h>
%End
public:
explicit QQmlExtensionPlugin(QObject *parent /TransferThis/ = 0);
virtual ~QQmlExtensionPlugin();
virtual void registerTypes(const char *uri) = 0;
QUrl baseUrl() const;
virtual void unregisterTypes();
};
class QQmlEngineExtensionPlugin : QObject
{
%TypeHeaderCode
#include <qqmlextensionplugin.h>
%End
public:
explicit QQmlEngineExtensionPlugin(QObject *parent /TransferThis/ = 0);
virtual ~QQmlEngineExtensionPlugin();
virtual void initializeEngine(QQmlEngine *engine, const char *uri);
};

View File

@@ -0,0 +1,35 @@
// qqmlfileselector.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlFileSelector : public QObject
{
%TypeHeaderCode
#include <qqmlfileselector.h>
%End
public:
QQmlFileSelector(QQmlEngine *engine, QObject *parent /TransferThis/ = 0);
virtual ~QQmlFileSelector();
void setSelector(QFileSelector *selector);
void setExtraSelectors(const QStringList &strings);
QFileSelector *selector() const;
};

View File

@@ -0,0 +1,85 @@
// qqmlincubator.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlIncubator
{
%TypeHeaderCode
#include <qqmlincubator.h>
%End
public:
enum IncubationMode
{
Asynchronous,
AsynchronousIfNested,
Synchronous,
};
enum Status
{
Null,
Ready,
Loading,
Error,
};
QQmlIncubator(QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous);
virtual ~QQmlIncubator();
void clear();
void forceCompletion();
bool isNull() const;
bool isReady() const;
bool isError() const;
bool isLoading() const;
QList<QQmlError> errors() const;
QQmlIncubator::IncubationMode incubationMode() const;
QQmlIncubator::Status status() const;
QObject *object() const /Factory/;
void setInitialProperties(const QVariantMap &initialProperties);
protected:
virtual void statusChanged(QQmlIncubator::Status);
virtual void setInitialState(QObject *);
private:
QQmlIncubator(const QQmlIncubator &);
};
class QQmlIncubationController
{
%TypeHeaderCode
#include <qqmlincubator.h>
%End
public:
QQmlIncubationController();
virtual ~QQmlIncubationController();
QQmlEngine *engine() const;
int incubatingObjectCount() const;
void incubateFor(int msecs) /ReleaseGIL/;
protected:
virtual void incubatingObjectCountChanged(int);
private:
QQmlIncubationController(const QQmlIncubationController &);
};

View File

@@ -0,0 +1,55 @@
// qqmllist.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlListReference
{
%TypeHeaderCode
#include <qqmllist.h>
%End
public:
QQmlListReference();
QQmlListReference(QObject *, const char *property, QQmlEngine *engine = 0);
QQmlListReference(const QQmlListReference &);
%If (Qt_6_1_0 -)
QQmlListReference(const QVariant &variant, QQmlEngine *engine = 0);
%End
~QQmlListReference();
bool isValid() const;
QObject *object() const;
const QMetaObject *listElementType() const;
bool canAppend() const;
bool canAt() const;
bool canClear() const;
bool canCount() const;
bool isManipulable() const;
bool isReadable() const;
bool append(QObject *) const;
QObject *at(qsizetype) const;
bool clear() const;
qsizetype count() const /__len__/;
bool canReplace() const;
bool canRemoveLast() const;
bool replace(qsizetype, QObject *) const;
bool removeLast() const;
bool operator==(const QQmlListReference &other) const;
};

View File

@@ -0,0 +1,32 @@
// qqmlnetworkaccessmanagerfactory.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlNetworkAccessManagerFactory
{
%TypeHeaderCode
#include <qqmlnetworkaccessmanagerfactory.h>
%End
public:
virtual ~QQmlNetworkAccessManagerFactory();
virtual QNetworkAccessManager *create(QObject *parent) = 0;
};

View File

@@ -0,0 +1,34 @@
// qqmlparserstatus.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlParserStatus /Mixin,PyQtInterface="org.qt-project.Qt.QQmlParserStatus"/
{
%TypeHeaderCode
#include <qqmlparserstatus.h>
%End
public:
QQmlParserStatus();
virtual ~QQmlParserStatus();
virtual void classBegin() = 0;
virtual void componentComplete() = 0;
};

View File

@@ -0,0 +1,130 @@
// qqmlproperty.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlProperty
{
%TypeHeaderCode
#include <qqmlproperty.h>
%End
public:
enum PropertyTypeCategory
{
InvalidCategory,
List,
Object,
Normal,
};
enum Type
{
Invalid,
Property,
SignalProperty,
};
QQmlProperty();
QQmlProperty(QObject *);
QQmlProperty(QObject *, QQmlContext *);
QQmlProperty(QObject *, QQmlEngine *);
QQmlProperty(QObject *, const QString &);
QQmlProperty(QObject *, const QString &, QQmlContext *);
QQmlProperty(QObject *, const QString &, QQmlEngine *);
QQmlProperty(const QQmlProperty &);
~QQmlProperty();
Py_hash_t __hash__() const;
%MethodCode
sipRes = qHash(*sipCpp);
%End
bool operator==(const QQmlProperty &) const;
QQmlProperty::Type type() const;
bool isValid() const;
bool isProperty() const;
bool isSignalProperty() const;
%If (Qt_6_2_0 -)
bool isBindable() const;
%End
int propertyType() const;
QQmlProperty::PropertyTypeCategory propertyTypeCategory() const;
const char *propertyTypeName() const;
%If (Qt_6_1_0 -)
QMetaType propertyMetaType() const;
%End
QString name() const;
QVariant read() const;
static QVariant read(const QObject *, const QString &);
static QVariant read(const QObject *, const QString &, QQmlContext *);
static QVariant read(const QObject *, const QString &, QQmlEngine *);
bool write(const QVariant &) const;
static bool write(QObject *, const QString &, const QVariant &);
static bool write(QObject *, const QString &, const QVariant &, QQmlContext *);
static bool write(QObject *, const QString &, const QVariant &, QQmlEngine *);
bool reset() const;
bool hasNotifySignal() const;
bool needsNotifySignal() const;
bool connectNotifySignal(SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/) const;
%MethodCode
QObject *receiver;
QByteArray slot;
if ((sipError = pyqt6_qtqml_get_connection_parts(a0, 0, "()", false, &receiver, slot)) == sipErrorNone)
{
sipRes = sipCpp->connectNotifySignal(receiver, slot.constData());
}
else if (sipError == sipErrorContinue)
{
sipError = sipBadCallableArg(0, a0);
}
%End
bool connectNotifySignal(QObject *dest, int method) const;
bool isWritable() const;
bool isDesignable() const;
bool isResettable() const;
QObject *object() const;
int index() const;
QMetaProperty property() const;
QMetaMethod method() const;
%If (Qt_6_3_0 -)
void swap(QQmlProperty &other);
%End
};
typedef QList<QQmlProperty> QQmlProperties;
%ModuleHeaderCode
// Imports from QtCore.
typedef sipErrorState (*pyqt6_qtqml_get_connection_parts_t)(PyObject *, QObject *, const char *, bool, QObject **, QByteArray &);
extern pyqt6_qtqml_get_connection_parts_t pyqt6_qtqml_get_connection_parts;
%End
%ModuleCode
// Imports from QtCore.
pyqt6_qtqml_get_connection_parts_t pyqt6_qtqml_get_connection_parts;
%End
%PostInitialisationCode
// Imports from QtCore.
pyqt6_qtqml_get_connection_parts = (pyqt6_qtqml_get_connection_parts_t)sipImportSymbol("pyqt6_get_connection_parts");
Q_ASSERT(pyqt6_qtqml_get_connection_parts);
%End

View File

@@ -0,0 +1,53 @@
// qqmlpropertymap.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlPropertyMap : public QObject
{
%TypeHeaderCode
#include <qqmlpropertymap.h>
%End
public:
explicit QQmlPropertyMap(QObject *parent /TransferThis/ = 0);
virtual ~QQmlPropertyMap();
QVariant value(const QString &key) const;
%If (Qt_6_1_0 -)
void insert(const QVariantHash &values);
%End
void insert(const QString &key, const QVariant &value);
%If (Qt_6_1_0 -)
void freeze();
%End
void clear(const QString &key);
QStringList keys() const;
int count() const;
int size() const /__len__/;
bool isEmpty() const;
bool contains(const QString &key) const;
QVariant operator[](const QString &key) const;
signals:
void valueChanged(const QString &key, const QVariant &value);
protected:
virtual QVariant updateValue(const QString &key, const QVariant &input);
};

View File

@@ -0,0 +1,33 @@
// qqmlpropertyvaluesource.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlPropertyValueSource /Mixin,PyQtInterface="org.qt-project.Qt.QQmlPropertyValueSource"/
{
%TypeHeaderCode
#include <qqmlpropertyvaluesource.h>
%End
public:
QQmlPropertyValueSource();
virtual ~QQmlPropertyValueSource();
virtual void setTarget(const QQmlProperty &) = 0;
};

View File

@@ -0,0 +1,41 @@
// qqmlscriptstring.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlScriptString
{
%TypeHeaderCode
#include <qqmlscriptstring.h>
%End
public:
QQmlScriptString();
QQmlScriptString(const QQmlScriptString &);
~QQmlScriptString();
bool isEmpty() const;
bool isUndefinedLiteral() const;
bool isNullLiteral() const;
QString stringLiteral() const;
qreal numberLiteral(bool *ok) const;
bool booleanLiteral(bool *ok) const;
bool operator==(const QQmlScriptString &) const;
bool operator!=(const QQmlScriptString &) const;
};