Qt 5.1 的新功能

Qt 5.1 introduces many changes for helping developers continue creating wonderful applications, easily and with less code. As well in this release, focus is placed on bug fixing and new features, while maintaining compatibility with Qt 5.0.

This page is a summary of new features. For specific API changes, the API 變化列錶 section contains links to new and obsolete classes.

新模塊

New modules add more functionality for developers to use on various platforms.

The 所有模塊 page contains a list of all modules in Qt 5.1.

新的支持平颱

Qt 5.1 introduces support for following new platforms with technology preview status:

變化摘要

moc 變化

  • New keyword in Q_PROPERTY (), MEMBER , lets you bind a property to a class member without requiring to have a getter or a setter.

qmake 變化

  • On Windows: Added support for specifying application icon (via RC_ICONS ).

Qt Core 變化

  • Added support for SHA3 to QCryptographicHash
  • Added toInt(), toUInt(), and similar functions to QStringRef
  • A new threadsafe initialization of global statics through refactored Q_GLOBAL_STATIC .
  • A new class, QLockFile , provides locking between processes using a file. This lock enables applications to check that there is only one instance of it running.
  • A new class, QSaveFile , provides transaction such as file writing.

Qt GUI 變化

Qt Network 變化

  • New encrypted() signal to QNetworkAccessManager and QNetworkReply so that applications can perform additional checks on the certificate chain.
  • Support for sending intermediate certificates when QSslSocket is used as a server and when using client certificates.
  • Support for SSL session reuse allowing much faster connections to servers.

Qt QML 變化

Qt Quick 變化

  • New threaded render loop for Mac, Linux, and Embedded.
  • New render loop for windows for smoother animations.
  • New Qt Quick Dialogs submodule with FileDialog and ColorDialog 類型。
  • New Window properties: activeFocusItem, minimumWidth, minimumHeight, maximumWidth, maximumHeight, visibility, contentOrientation, and opacity.
  • New Item property: activeFocusOnTab.
  • New Grid properties: horizontalAlignment, verticalAlignment, and effectiveHorizontalAlignment.
  • New TextEdit properties: selectByKeyboard and textDocument
  • A Window declared inside another Window or Item will automatically be transient for (centered upon) the outer window.

Qt WebKit 變化

  • JavaScript JIT on Windows 64 bit.
  • Improved font rendering, kerning enabled by default.
  • Improved garbage collection.
  • 支持 WOFF 字體。
  • Support for WebGL without accelerated compositing.
  • 支持 GStreamer 1.0。
  • Improved perceived page load performance and support for Link prefetch.

Qt Widgets 變化

  • Added property toolTipsVisible in QMenu .

Qt Creator 兼容性

Qt Creator 2.7 complements this Qt release with the most prominent new features:

其它新特徵

  • 還原支持靜態 Qt 構建

API 變化列錶

以下頁麵包含 Qt 5.1 中的 API 變化列錶

其它 Qt 5 發行的補充