Qt Reference Documentation

Contents

What's New in Qt 4.8

Qt 4.8 provides many improvements and enhancements over the previous releases in the Qt 4 series. This document covers the most important features in this release, separated by category.

A list of other Qt 4 features can be found on the What's New in Qt 4 page.

Qt Quick 1.1

Qt Quick 1.1 introduces new changes such as new properties and better performance.

Qt Platform Abstraction -- Lighthouse

QPA allows porting Qt to different windowing systems and devices easier. It provides a clean abstraction layer for porting QtGui to new window systems.

Qt WebKit 2.2

The new Qt WebKit release introduces bug fixes, performance improvements, and greater compiler compatibility.

Threaded OpenGL

Many Qt OpenGL functions are now thread-safe. Threads that cater to different situations are now available.

Deprecated Items in Qt 4.8

As part of Open Governance, modules in Qt 4.8 will receive maintainers and receive different support levels.

Currently, a module has an activity classification, the Module Maturity Level. As well, a list of modules and their maturity level is in the Qt Developer Network.

Additions to the Qt API

Qt 4.8 introduces changes to the Qt API.

New Classes, Functions, Macros, etc.

New Classes

New Member Functions

Class QContiguousCache:

void swap ( QContiguousCache<T> & other )

Class QDBusAbstractInterface:

void setTimeout ( int timeout )
int timeout () const

Class QSharedMemory:

QString nativeKey () const
void setNativeKey ( const QString & key )

Class QNetworkProxyQuery:

void setNetworkConfiguration ( const QNetworkConfiguration & networkConfiguration )

Class QHelpSearchQueryWidget:

void collapseExtendedSearch ()
void expandExtendedSearch ()
void setQuery ( const QList<QHelpSearchQuery> & queryList )

Class QThreadPool:

bool waitForDone ( int msecs )

Class QNetworkReply:

void setFinished ( bool finished )

Class QGraphicsLayout:

bool instantInvalidatePropagation ()
void setInstantInvalidatePropagation ( bool enable )

Class QDBusConnection:

QDBusConnection connectToPeer ( const QString & address, const QString & name )
ConnectionCapabilities connectionCapabilities () const
void disconnectFromPeer ( const QString & name )
QByteArray localMachineId ()

Class QGraphicsGridLayout:

void removeItem ( QGraphicsLayoutItem * item )

Class QPrinterInfo:

QPrinterInfo & operator= ( const QPrinterInfo & other )

Class QGLFramebufferObjectFormat:

bool mipmap () const
void setMipmap ( bool enabled )

Class QGraphicsWebView:

QPainter::RenderHints renderHints () const
void setRenderHint ( QPainter::RenderHint hint, bool enabled = true )
void setRenderHints ( QPainter::RenderHints hints )

Class QStringRef:

bool contains ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool contains ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool contains ( const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int count ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int count ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int count ( const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool endsWith ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool endsWith ( QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool endsWith ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool endsWith ( const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int indexOf ( const QString & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int indexOf ( QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int indexOf ( QLatin1String str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int indexOf ( const QStringRef & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int lastIndexOf ( const QString & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int lastIndexOf ( QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int lastIndexOf ( QLatin1String str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
int lastIndexOf ( const QStringRef & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool startsWith ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool startsWith ( QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool startsWith ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
bool startsWith ( const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
QByteArray toAscii () const
QByteArray toLatin1 () const
QByteArray toLocal8Bit () const
QVector<uint> toUcs4 () const
QByteArray toUtf8 () const

Class QNetworkConfigurationManager:

void configurationRemoved ( const QNetworkConfiguration & config )

Class QNetworkAccessManager:

QNetworkReply * post ( const QNetworkRequest & request, QHttpMultiPart * multiPart )
QNetworkReply * put ( const QNetworkRequest & request, QHttpMultiPart * multiPart )

Class QWebPage:

void viewportChangeRequested ()

Class QElapsedTimer:

qint64 nsecsElapsed () const

Class QAbstractProxyModel:

virtual QModelIndex buddy ( const QModelIndex & index ) const
virtual bool canFetchMore ( const QModelIndex & parent ) const
virtual void fetchMore ( const QModelIndex & parent )
virtual bool hasChildren ( const QModelIndex & parent = QModelIndex() ) const
virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const
virtual QStringList mimeTypes () const
virtual void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder )
virtual QSize span ( const QModelIndex & index ) const
virtual Qt::DropActions supportedDropActions () const

Class QUndoCommand:

QString actionText () const

Class QXmlStreamWriter:

bool hasError () const

Class QSslSocket:

QString peerVerifyName () const
void setPeerVerifyName ( const QString & hostName )

Class QProcessEnvironment:

void insert ( const QProcessEnvironment & e )
QStringList keys () const

New Global Functions

bool operator!= ( const QVarLengthArray<T, Prealloc1> & left, const QVarLengthArray<T, Prealloc2> & right )
bool operator!= ( const QPlatformWindowFormat & a, const QPlatformWindowFormat & b )
const QPoint operator* ( int factor, const QPoint & point )
const QPoint operator* ( double factor, const QPoint & point )
const QPoint operator* ( float factor, const QPoint & point )
const QPoint operator* ( const QPoint & point, int factor )
const QPoint operator* ( const QPoint & point, double factor )
const QPoint operator* ( const QPoint & point, float factor )
bool operator== ( const QVarLengthArray<T, Prealloc1> & left, const QVarLengthArray<T, Prealloc2> & right )
bool operator== ( const QPlatformWindowFormat & a, const QPlatformWindowFormat & b )

New Macros

Q_LIKELY ( expr )
Q_UNLIKELY ( expr )