Type Conversions

Many of Qt's basic data types, such as QString, QPoint, or QImage, provide conversions to and from the native equivalent types.

The following list enumerates all of the available type conversions:

QPointF::fromCGPoint()

Creates a QRectF from CGPoint point

QRectF::fromCGRect()

Creates a QRectF from CGRect rect

QSizeF::fromCGSize()

Creates a QRectF from size

QUuid::fromCFUUID()

Constructs a new QUuid containing a copy of the uuid CFUUID

QUuid::fromNSUUID()

Constructs a new QUuid containing a copy of the uuid NSUUID

QStringView::toCFString()

Creates a CFString from this QStringView

QUuid::toCFUUID()

Creates a CFUUID from a QUuid

QPoint::toCGPoint()

Creates a CGPoint from a QPoint

QPointF::toCGPoint()

Creates a CGPoint from a QPointF

QRect::toCGRect()

Creates a CGRect from a QRect

QRectF::toCGRect()

Creates a CGRect from a QRectF

QSize::toCGSize()

Creates a CGSize from a QSize

QSizeF::toCGSize()

Creates a CGSize from a QSizeF

QStringView::toNSString()

Creates an NSString from this QStringView

QUuid::toNSUUID()

Creates a NSUUID from a QUuid