Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

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 theWhat's New in Qt 4 page.

Qt Quick 1.1

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

  • Right-To-Left text support
  • Improved image caching
  • Text input improvements - Support for split-screen virtual keyboard
  • PinchArea Element - enables simple pinch gesture handling
  • New properties forQML Elements.

Qt Platform Abstraction --Lighthouse

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

Note:QPA is considered an experimental feature in Qt 4.8. In Qt 5 it is a supported and complete feature.

Qt WebKit 2.2

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

Threaded OpenGL

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

  • Buffer swapping thread
  • Texture uploading thread
  • QPainter thread

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, theModule Maturity Level. As well, a list of modules and their maturity level is in theQt 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

ClassQGraphicsWebView:

QPainter::RenderHintsrenderHints() const
voidsetRenderHint(QPainter::RenderHint hint, bool enabled = true)
voidsetRenderHints(QPainter::RenderHints hints)

ClassQWebPage:


ClassQThreadPool:

boolwaitForDone(int msecs)

ClassQProcessEnvironment:

voidinsert(const QProcessEnvironment & e)
QStringListkeys() const

ClassQUrl:

boolisLocalFile() const
voidswap(QUrl & other)
QStringtopLevelDomain() const

ClassQAbstractItemModel:


ClassQObject:

boolconnect(const QObject * sender, const QMetaMethod & signal, const QObject * receiver, const QMetaMethod & method, Qt::ConnectionType type = Qt::AutoConnection)
booldisconnect(const QObject * sender, const QMetaMethod & signal, const QObject * receiver, const QMetaMethod & method)
intsenderSignalIndex() const

ClassQSharedMemory:

QStringnativeKey() const
voidsetNativeKey(const QString & key)

ClassQTranslator:

boolload(const QLocale & locale, const QString & filename, const QString & prefix = QString(), const QString & directory = QString(), const QString & suffix = QString())

ClassQVariant:

voidswap(QVariant & other)

ClassQUuid:

QUuidfromRfc4122(const QByteArray & bytes)
QByteArraytoByteArray() const
QByteArraytoRfc4122() const

ClassQBitArray:

voidswap(QBitArray & other)

ClassQByteArray:

voidswap(QByteArray & other)

ClassQContiguousCache:

voidswap(QContiguousCache<T> & other)

ClassQChar:

UnicodeVersioncurrentUnicodeVersion()

ClassQElapsedTimer:

qint64nsecsElapsed() const

ClassQHash:

voidswap(QHash<Key, T> & other)

ClassQMultiHash:

voidswap(QMultiHash<Key, T> & other)

ClassQLinkedList:

voidswap(QLinkedList<T> & other)

ClassQList:

voidswap(QList<T> & other)

ClassQLocale:

QStringbcp47Name() const
QStringcreateSeparatedList(const QStringList & list) const
QStringcurrencySymbol(CurrencySymbolFormat format = CurrencySymbol) const
Qt::DayOfWeekfirstDayOfWeek() const
QList<QLocale>matchingLocales(QLocale::Language language, QLocale::Script script, QLocale::Country country)
QStringnativeCountryName() const
QStringnativeLanguageName() const
QStringquoteString(const QString & str, QuotationStyle style = StandardQuotation) const
QStringquoteString(const QStringRef & str, QuotationStyle style = StandardQuotation) const
Scriptscript() const
QStringscriptToString(Script script)
QStringtoCurrencyString(qlonglong value, const QString & symbol = QString()) const
QStringtoCurrencyString(qulonglong value, const QString & symbol = QString()) const
QStringtoCurrencyString(short value, const QString & symbol = QString()) const
QStringtoCurrencyString(ushort value, const QString & symbol = QString()) const
QStringtoCurrencyString(int value, const QString & symbol = QString()) const
QStringtoCurrencyString(uint value, const QString & symbol = QString()) const
QStringtoCurrencyString(double value, const QString & symbol = QString()) const
QStringtoCurrencyString(float value, const QString & symbol = QString()) const
QStringtoLower(const QString & str) const
QStringtoUpper(const QString & str) const
QStringListuiLanguages() const
QList<Qt::DayOfWeek>weekdays() const

ClassQMap:

voidswap(QMap<Key, T> & other)

ClassQQueue:

voidswap(QQueue<T> & other)

ClassQPoint:

QPoint &operator*=(float factor)
QPoint &operator*=(double factor)
QPoint &operator*=(int factor)

ClassQMultiMap:

voidswap(QMultiMap<Key, T> & other)

ClassQRegExp:

voidswap(QRegExp & other)

ClassQSet:

voidswap(QSet<T> & other)

ClassQString:

boolcontains(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intcount(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolendsWith(const QStringRef & s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intindexOf(const QStringRef & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intlastIndexOf(const QStringRef & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolstartsWith(const QStringRef & s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
voidswap(QString & other)

ClassQStack:

voidswap(QStack<T> & other)

ClassQStringRef:

boolcontains(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolcontains(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolcontains(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intcount(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intcount(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intcount(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolendsWith(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolendsWith(QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolendsWith(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolendsWith(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intindexOf(const QString & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intindexOf(QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intindexOf(QLatin1String str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intindexOf(const QStringRef & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intlastIndexOf(const QString & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intlastIndexOf(QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intlastIndexOf(QLatin1String str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
intlastIndexOf(const QStringRef & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolstartsWith(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolstartsWith(QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolstartsWith(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
boolstartsWith(const QStringRef & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const
QByteArraytoAscii() const
QByteArraytoLatin1() const
QByteArraytoLocal8Bit() const
QVector<uint>toUcs4() const
QByteArraytoUtf8() const

ClassQVarLengthArray:

iteratorbegin()
const_iteratorbegin() const
const_iteratorconstBegin() const
const_iteratorconstEnd() const
iteratorend()
const_iteratorend() const
iteratorerase(iterator begin, iterator end)
iteratorerase(iterator pos)
voidinsert(int i, const T & value)
voidinsert(int i, int count, const T & value)
iteratorinsert(iterator before, int count, const T & value)
iteratorinsert(iterator before, const T & value)
QVarLengthArray<T, Prealloc> &operator+=(const T & value)
QVarLengthArray<T, Prealloc> &operator<<(const T & value)
voidprepend(const T & value)
voidremove(int i)
voidremove(int i, int count)
voidreplace(int i, const T & value)

ClassQVector:

voidswap(QVector<T> & other)

ClassQXmlStreamWriter:

boolhasError() const

ClassQDBusAbstractInterface:

voidsetTimeout(int timeout)
inttimeout() const

ClassQDBusConnection:

QDBusConnectionconnectToPeer(const QString & address, const QString & name)
ConnectionCapabilitiesconnectionCapabilities() const
voiddisconnectFromPeer(const QString & name)
QByteArraylocalMachineId()

ClassQGraphicsGridLayout:

voidremoveItem(QGraphicsLayoutItem * item)

ClassQGraphicsLayout:


ClassQBitmap:

voidswap(QBitmap & other)

ClassQIcon:

voidswap(QIcon & other)

ClassQImage:

voidfill(const QColor & color)
voidfill(Qt::GlobalColor color)
voidswap(QImage & other)

ClassQPicture:

voidswap(QPicture & other)

ClassQPixmap:

voidswap(QPixmap & other)

ClassQAbstractProxyModel:

virtual QModelIndexbuddy(const QModelIndex & index) const
virtual boolcanFetchMore(const QModelIndex & parent) const
virtual voidfetchMore(const QModelIndex & parent)
virtual boolhasChildren(const QModelIndex & parent = QModelIndex()) const
virtual QMimeData *mimeData(const QModelIndexList & indexes) const
virtual QStringListmimeTypes() const
virtual voidsort(int column, Qt::SortOrder order = Qt::AscendingOrder)
virtual QSizespan(const QModelIndex & index) const
virtual Qt::DropActionssupportedDropActions() const

ClassQApplication:

Qt::KeyboardModifiersqueryKeyboardModifiers()

ClassQFileOpenEvent:

boolopenFile(QFile & file, QIODevice::OpenMode flags) const

ClassQKeySequence:

voidswap(QKeySequence & other)

ClassQSizePolicy:

boolhasWidthForHeight() const
voidsetWidthForHeight(bool dependent)

ClassQWidget:

(preliminary)QPlatformWindow *platformWindow() const
QPlatformWindowFormatplatformWindowFormat() const
(preliminary)voidsetPlatformWindow(QPlatformWindow * window)
voidsetPlatformWindowFormat(const QPlatformWindowFormat & format)

ClassQBrush:

voidswap(QBrush & other)

ClassQRadialGradient:

qrealcenterRadius() const
qrealfocalRadius() const
voidsetCenterRadius(qreal radius)
voidsetFocalRadius(qreal radius)

ClassQPainter:

QRectFclipBoundingRect() const
voiddrawGlyphRun(const QPointF & position, const QGlyphRun & glyphs)
voiddrawPixmapFragments(const QRectF * targetRects, const QRectF * sourceRects, int fragmentCount, const QPixmap & pixmap, PixmapFragmentHints hints = 0)

ClassQPainterPath:

voidswap(QPainterPath & other)

ClassQPolygon:

voidswap(QPolygon & other)

ClassQPen:

voidswap(QPen & other)

ClassQPolygonF:

voidswap(QPolygonF & other)

ClassQPrinterInfo:

QPrinterInfo &operator=(const QPrinterInfo & other)

ClassQRegion:

voidswap(QRegion & other)

ClassQFont:

HintingPreferencehintingPreference() const
voidsetHintingPreference(HintingPreference hintingPreference)
voidsetStyleName(const QString & styleName)
QStringstyleName() const

ClassQFontMetrics:

boolinFontUcs4(uint character) const

ClassQFontInfo:

QStringstyleName() const

ClassQFontMetricsF:

boolinFontUcs4(uint ch) const

ClassQTextDocument:

Qt::CursorMoveStyledefaultCursorMoveStyle() const
voidsetDefaultCursorMoveStyle(Qt::CursorMoveStyle style)

ClassQTextCharFormat:

QFont::HintingPreferencefontHintingPreference() const
voidsetFontHintingPreference(QFont::HintingPreference hintingPreference)

ClassQTextBlockFormat:

qreallineHeight(qreal scriptLineHeight, qreal scaling) const
qreallineHeight() const
intlineHeightType() const
voidsetLineHeight(qreal height, int heightType)

ClassQTextListFormat:

QStringnumberPrefix() const
QStringnumberSuffix() const
voidsetNumberPrefix(const QString & numberPrefix)
voidsetNumberSuffix(const QString & numberSuffix)

ClassQTextLayout:

Qt::CursorMoveStylecursorMoveStyle() const
QList<QGlyphRun>glyphRuns() const
intleftCursorPosition(int oldPos) const
intrightCursorPosition(int oldPos) const
voidsetCursorMoveStyle(Qt::CursorMoveStyle style)

ClassQUndoCommand:

QStringactionText() const

ClassQCheckBox:

virtual QSizeminimumSizeHint() const

ClassQLineEdit:

Qt::CursorMoveStylecursorMoveStyle() const
voidsetCursorMoveStyle(Qt::CursorMoveStyle style)

ClassQRadioButton:

virtual QSizeminimumSizeHint() const

ClassQTabWidget:

virtual intheightForWidth(int width) const

ClassQNetworkAccessManager:

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

ClassQNetworkReply:

voidsetFinished(bool finished)

ClassQNetworkConfigurationManager:

voidconfigurationRemoved(const QNetworkConfiguration & config)

ClassQNetworkProxyQuery:

voidsetNetworkConfiguration(const QNetworkConfiguration & networkConfiguration)

ClassQNativeSocketEngine:

virtual booljoinMulticastGroup(const QHostAddress & groupAddress, const QNetworkInterface & iface)
virtual boolleaveMulticastGroup(const QHostAddress & groupAddress, const QNetworkInterface & iface)
virtual QNetworkInterfacemulticastInterface() const
virtual boolsetMulticastInterface(const QNetworkInterface & iface)

ClassQUdpSocket:

booljoinMulticastGroup(const QHostAddress & groupAddress)
booljoinMulticastGroup(const QHostAddress & groupAddress, const QNetworkInterface & iface)
boolleaveMulticastGroup(const QHostAddress & groupAddress)
boolleaveMulticastGroup(const QHostAddress & groupAddress, const QNetworkInterface & iface)
QNetworkInterfacemulticastInterface() const
voidsetMulticastInterface(const QNetworkInterface & iface)

ClassQSslConfiguration:

booltestSslOption(QSsl::SslOption option) const

ClassQSslSocket:

QStringpeerVerifyName() const
voidsetPeerVerifyName(const QString & hostName)

ClassQGLFormat:

QGLFormatfromPlatformWindowFormat(const QPlatformWindowFormat & format)
QPlatformWindowFormattoPlatformWindowFormat(const QGLFormat & format)

ClassQGLContext:

QGLContext *fromPlatformGLContext(QPlatformGLContext * platformContext)

ClassQGLFramebufferObjectFormat:

boolmipmap() const
voidsetMipmap(bool enabled)

ClassQSqlRelationalTableModel:

voidsetJoinMode(QSqlRelationalTableModel::JoinMode joinMode)

ClassQHelpSearchQueryWidget:

voidcollapseExtendedSearch()
voidexpandExtendedSearch()
voidsetQuery(const QList<QHelpSearchQuery> & queryList)

New Global Functions

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

New Macros

Q_LIKELY( expr)
Q_UNLIKELY( expr)

New Enum Types

enumConnectionCapability { UnixFileDescriptorPassing }
enumFileHandleFlag { AutoCloseHandle, DontCloseHandle }
enumHintingPreference { PreferDefaultHinting, PreferNoHinting, PreferVerticalHinting, PreferFullHinting }
enumCurrencySymbolFormat { CurrencyIsoCode, CurrencySymbol, CurrencyDisplayName }
enumQuotationStyle { StandardQuotation, AlternateQuotation }
enumScript { AnyScript, ArabicScript, CyrillicScript, DeseretScript, ..., TifinaghScript }
enumJoinMode { InnerJoin, LeftJoin }
enumLineHeightTypes { SingleHeight, ProportionalHeight, FixedHeight, MinimumHeight, LineDistanceHeight }
enumCursorMoveStyle { LogicalMoveStyle, VisualMoveStyle }

New Typedefs

typedefconst_reference
typedefreference
typedefvalue_type

New Properties

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp