Qt:Документация 4.3.2/qt4-3-intro

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь



Главная · Все классы · Основные классы · Классы по группам · Модули · Функции



[править] What's New in Qt 4.3

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

A comprehensive list of changes between Qt 4.2 and Qt 4.3 is included in the changes-4.3.0 file provided with Qt, and is also available online. Changes between this release and the previous release are provided in the changes-4.3.2 file (also available online.

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


[править] Main Window Styles

The main window classes now provide support for different main window paradigms, such as those found in Visual Studio or KDevelop.

Dock widgets occupying the same area can now be arranged in horizontal, vertical or collapsible tabs. Collapsible tabs are oriented according to the location of dock widgets around the main window's central area.



API improvements to QDockWidget enable dock widgets to be given custom title bars and window styles, and also include support for vertical title bars.


Additionally, support for animations has been extended to tool bars, resulting in more sophisticated effects when tool bars and dock widgets are rearranged. See the Main Window demonstration for an extensive tour of these new features.

[править] QtScript - Application Scripting with ECMAScript

This release introduces the QtScript module, providing a script engine for the ECMAScript language, based on the ECMA-262 standard, that is designed to enable easier integration of scripting facilities into end-user applications.


Scripts access application functionality via QObjects that are specifically created and exposed by each application. Information about the available child objects, properties, signals and slots is provided by Qt's object model. This means that, in many cases, script-enabling an application requires little effort on the part of the developer.


A set of examples are included to show how classes and functions written in C++ can be exposed to the script engine, including a port of the Calculator example which shows how a QtScript can be used with a user interface created with Qt Designer.

[править] Improved Graphics Support

To improve graphics performance on Windows, this release includes an experimental Direct3D paint engine to provide native hardware acceleration on Windows systems with suitable graphics hardware. Although we have conducted internal testing with a selection of graphics cards, we cannot guarantee that this feature will work correctly with all hardware or drivers. Please report feedback on this feature via the Task Tracker.

Qt's interoperability with the Scalable Vector Graphics (SVG) file format has been improved by the introduction of the QSvgGenerator class, a paint device that can be used to save Qt rendering operations in the form of an SVG drawing. This class can be used alongside the existing QSvgWidget and QSvgRenderer classes to provide full input/output support for vector graphics.

The OpenGL paint engine has been heavily improved to take advantage of new features in modern graphics hardware. Through the extensive usage of fragment programs, users with suitable graphics hardware can expect to experience much faster and higher quality rendering when OpenGL is used. Support for an additional anti-aliasing mode for OpenGL allows developers to choose between high quality rendering or speed when older or less-capable hardware is used.

The QTransform class adds support for arbitrary matrix operations on two-dimensional coordinates, allowing perspective transformations to be applied to 2D graphics.

Support for set operations on paths has been added to QPainterPath, improving support for clipping and animations.

An object bounding mode for gradients that enables them to be defined in terms of the bounding rectangle of the objects they are applied to.

[править] New Widgets and Desktop Integration Enhancements

Applications running on Windows Vista automatically support animations and other Vista-related enhancements through the use of the new QWindowsVistaStyle class, providing a widget style that gives Qt applications a native look and feel on Windows Vista.

Qt 4.3 also provides a number of new and redesigned widgets, including the QWizard class which supports application wizard functionality in a variety of native styles, including one for Windows Vista applications.

center center center

Unified toolbar support on Mac OS X improves the look and feel of applications by blending adjacent toolbars and window title bars together.


Qt's range of model/view classes has been expanded to include the QColumnView class, an animated list view similar to that found on small-screen devices.

The QMdiArea class provides an Multiple Document Interface (MDI) widget that is intended to provide a more consistent API for developers to use and more predictable behavior for users. The API has been designed to be very similar to that provided by QWorkspace in order to make porting between the two widgets a straightforward task.


On X11, QFileDialog has been optimized to perform better with directories containing large numbers of files, automatically updates when files are added or removed, and has a brand new look and feel.

A platform-independent way to notify users about activity in a window is provided by the QApplication::alert() function. This alerts the user by using the appropriate notification mechanism for their chosen platform and environment.

QWidget now provides a locale property that can be used to give individual windows, dialogs and widgets different look and feel different languages and regions.

Almost all standard widgets can be styled with Qt Style Sheets, making it easier to customize the appearance of applications.

An enhanced layout system accommodates many special cases for Mac OS X, enabling Mac OS X style to provide a faithful Mac look and feel.

[править] Qt Designer Improvements

Qt Designer has seen a number of improvements since Qt 4.2, many of which are focused on making the application easier to use. Other improvements track other additions and new features in Qt, such as new widgets and support for application scripting.

Support for dynamic properties enables standard Qt widgets and user-created forms to be customized with extra information from within Qt Designer.


The property editor has been updated to support the new margin and spacing properties added to Qt as part of improvements to the layout system.

Selection handling has been improved to allow properties to be changed when more than one widget has been selected.

Drag and drop support has been extended to allow widgets to be dragged to the object inspector. Additionally, images can be dragged from the resource editor to the action editor and to image/icon properties in the property editor.

A new preferences dialog introduces the ability to set tool window fonts (added at the request of Japanese customers).

Improved selection behaviour in the signal slot editor by introducing transparent connection labels and ensuring that widgets are selected in preference to connection labels.

Improved handling of promoted widgets makes it easier and more convenient to work with placeholders for custom widgets; promotion candidates are now displayed in the form's context menu. Multiple widgets in a selection can now be promoted at the same time.

Custom widget plugin support has been extended to provide error reporting for cases where plugins fail to load. Additionally, Qt Designer is now able to scan for newly installed custom widget plugins.

Qt Designer's configuration options have been extended to allow the default form editor grid setting to be set, enabling the grid setting to be specified on a per-form basis.

Enabled multi-line plain and rich text editing for labels.

[править] Extended and Improved Infrastructure

The QtNetwork module has been extended to include support for Secure Socket Layer (SSL) communications via the QSslSocket class. As a result, QHttp is now able to provide support for the HTTPS protocol.

Qt's network proxying facilties have been extended to cover HTTP CONNECT proxying, and also include support for Cram-MD5 and NTLM authentication.

Qt Linguist has been extended to provide support for XML Localization Interchange File Format (XLIFF) files, improving interoperability with third party tools and services that support this format.

The QtXml module has been expanded with classes to provide a streaming API for handling XML: QXmlStreamReader and QXmlStreamWriter complement Qt's existing range of SAX and DOM-based classes.

Support for the MSYS environment for MinGW on Windows.

Qt's threading has been enhanced to include support for timed try-locks in QMutex, QReadWriteLock and QSemaphore. Additionally, a BlockingQueuedConnection connection type has been introduced to complement DirectConnection and QueuedConnection.

QThread has been updated to provide an idealThreadCount() function. This takes various system-specific factors into account to determine the optimal number of threads that can be run on a given system.

The event system has been extended to allow events to be posted with specific priorities, enabling applications to prioritize certain types of event depending on the activities they are performing.

QDir has been enhanced with the addSearchPath() function to provide an extensible mechanism, allowing search paths to be added at run time to Qt's resource system.

The new QDirIterator class provides a convenient and less resource-intensive way to traverse large directory structures.

[править] Qtopia Core

As in Qt 4.2, many improvements to Qt's graphics support and rendering performance are specific to Qtopia Core. These include general speed optimizations, accelerated graphics API improvements, and additional support for OpenGL ES.

A new font subsystem has been implemented that allows glyphs rendered at run time to be shared between applications. A new pre-rendered font format (QPF2) has also been implemented together with a new makeqpf tool to generate them.

In addition, support for custom font engine plugins has been added through the QAbstractFontEngine and QFontEnginePlugin classes.

Copyright © 2007 Trolltech Trademarks
Qt 4.3.2