PySide Namespace

Root namespace. More...

Header: #include <class_property.h>

Namespaces

namespace ClassDecorator
namespace ClassInfo
namespace ClassProperty
namespace Feature
namespace MetaFunction
namespace Numpy
namespace Property
namespace PySideMagicName
namespace PySideName
namespace QEnum
namespace Signal
namespace SignalManager
namespace Slot
namespace Variant
namespace WeakRef

Classes

Variables

Functions

bool callConnect(PyObject *self, const char *signal, PyObject *argument)
int *convertToQObject(PyObject *object, bool raiseError)
int createQObjectPtrMetaType(const int *metaObject)
void destroyQCoreApplication()
std::size_t getSizeOfQObject(PyTypeObject *type)
PyTypeObject *getTypeForQObject(const int *cppSelf)
bool inherits(PyTypeObject *self, const char *class_name)
void initDynamicMetaObject(PyTypeObject *type, const int *base, std::size_t cppObjSize)
void initQObjectSubType(PyTypeObject *type, PyObject *args, PyObject *kwds)
bool isCompiledMethod(PyObject *callback)
bool isQObjectDerived(PyTypeObject *pyType, bool raiseError)
bool isUiClassName(int name)
int &nextQObjectMemoryAddrMutex()
int pyPathToQString(PyObject *path)
int pyStringToQString(PyObject *str)
int pyUnicodeToQString(PyObject *str)
int qMetaTypeFromPyType(PyTypeObject *type)
PyTypeObject *qObjectType()
PyObject *qStringToPyUnicode(int s)
void registerCleanupFunction(PySide::CleanupFunction func)
bool registerInternalQtConf()
void setNextQObjectMemoryAddr(void *addr)
void setQObjectType(PyTypeObject *t)
int sysExecutable()

Detailed Description

Namespaces

namespace PySide::ClassDecorator

namespace PySide::ClassInfo

namespace PySide::ClassProperty

PYSIDE-2230: Why is this metaclass necessary? The problem is that the property object already exists as a Python object. We derive a subclass for class properties, without repeating everything but just by adding something to support the class-ness.

But this Python property has as metaclass `type` which is incompatible now with SbkObjectType, which generates physically larger types that are incompatible with properties by using PEP 697. Adding a compatible metaclass that is unrelated to `SbkObjectType` is the correct solution. Re-using `SbkObjectType` was actually an abuse, since Python properties are in no way PySide objects.

namespace PySide::Feature

namespace PySide::MetaFunction

namespace PySide::Numpy

namespace PySide::Property

namespace PySide::PySideMagicName

namespace PySide::PySideName

namespace PySide::QEnum

namespace PySide::Signal

namespace PySide::SignalManager

namespace PySide::Slot

namespace PySide::Variant

namespace PySide::WeakRef

Classes

class PyObjectWrapper

Thin wrapper for passing PyObject in QVariant. More...

Variable Documentation

int PySide::qobjectConnect

Helper for QObject::connect(): Makes a connection based on QMetaMethod of type type from the signal of source to the slot of receiver.

int PySide::qobjectConnectCallback

Helper for QObject::connect(): Makes a connection of type type from the signal of source to a Python callback and a context object.

bool PySide::qobjectDisconnectCallback

Helper for QObject::disconnect(): Disconnects a Python callback from the signal of source. Returns whether the disconnection succeeded.

Function Documentation

bool PySide::callConnect(PyObject *self, const char *signal, PyObject *argument)

Helper for functions that forward arguments to QObject::connect(), for example, QTimer::singleShot(). Connects the signal of self to argument, which can be a signal or a callable. Returns whether the connection succeeded.

int *PySide::convertToQObject(PyObject *object, bool raiseError)

Convenience to convert a PyObject object to QObject. raiseError controls whether a TypeError is raised when the conversion fails.

int PySide::createQObjectPtrMetaType(const int *metaObject)

Creates a QMetaType for a pointer to a QObject-derived Python class described by metaObject for use in signal/slot connections (SIGNAL("mySignal(MyClass*)")).

void PySide::destroyQCoreApplication()

Destroys a QCoreApplication taking care of destroying all instances of QObject first.

std::size_t PySide::getSizeOfQObject(PyTypeObject *type)

Returns the size in bytes of a type that inherits QObject.

PyTypeObject *PySide::getTypeForQObject(const int *cppSelf)

Returns the best-matching type for the QObject cppSelf (Helper for QObject.findType()).

bool PySide::inherits(PyTypeObject *self, const char *class_name)

Returns whether the type self inherits from the class named class_name.

void PySide::initDynamicMetaObject(PyTypeObject *type, const int *base, std::size_t cppObjSize)

Initializes the DynamicMetaObject helper for a wrapped Qt type (generated code) with the meta object base of the C++ class of size cppObjSize.

void PySide::initQObjectSubType(PyTypeObject *type, PyObject *args, PyObject *kwds)

Initializes a Python-derived type created with the arguments args and kwds.

bool PySide::isCompiledMethod(PyObject *callback)

Returns whether callback is a compiled method (Nuitka). See also Shiboken::isCompiledMethod().

bool PySide::isQObjectDerived(PyTypeObject *pyType, bool raiseError)

Returns whether the PyTypeObject pyType or its bases contain a QObject. raiseError controls whether a TypeError is raised when the type does not inherit QObject.

bool PySide::isUiClassName(int name)

Returns whether name is a valid class name in a .ui file (C++ or Python).

int &PySide::nextQObjectMemoryAddrMutex()

Returns the mutex for accessing QObject memory helpers from multiple threads.

int PySide::pyPathToQString(PyObject *path)

Provides an efficient, correct PathLike interface converting path to a QString.

int PySide::pyStringToQString(PyObject *str)

Given a PyObject str representing ASCII or Unicode data, returns an equivalent QString.

int PySide::pyUnicodeToQString(PyObject *str)

Given a PyObject str representing Unicode data, returns an equivalent QString.

int PySide::qMetaTypeFromPyType(PyTypeObject *type)

Returns the QMetaType matching the PyTypeObject type.

PyTypeObject *PySide::qObjectType()

Returns the PyTypeObject for QObject.

See also setQObjectType().

PyObject *PySide::qStringToPyUnicode(int s)

Given a string s, returns the PyObject representing Unicode data.

void PySide::registerCleanupFunction(PySide::CleanupFunction func)

Registers a function func to be called before Python dies.

bool PySide::registerInternalQtConf()

Registers a dynamic qt.conf file with the Qt resource system.

This is used in a standalone build, to inform QLibraryInfo of the Qt prefix (where Qt libraries are installed) so that plugins can be successfully loaded.

This is also used if PySide runs from inside a conda environment to solve conflicts with the qt.conf installed by Anaconda Qt packages.

Returns whether the registration succeeded.

void PySide::setNextQObjectMemoryAddr(void *addr)

Sets the address addr where to allocate the next QObject (for QML).

void PySide::setQObjectType(PyTypeObject *t)

Sets the PyTypeObject for QObject to t (called from QtCore module).

See also qObjectType().

int PySide::sysExecutable()

Returns the Python binary (value of sys.executable).