Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Changes in Qt Multimedia

The Qt Multimedia module in Qt 5 is a combination of the Qt Multimedia module in Qt 4.x and the Qt Multimedia Kit module of Qt Mobility. It replaces both of these modules by combining the code. If you've previously used Qt Multimedia there are not too many changes required for existing code, but there are some larger changes required for porting code that used Qt Multimedia Kit (most notably the namespace and header file prefix has changed, and the qmake pro file changes needed to enable Qt Multimedia).

One other change of note is that widget related classes (like QVideoWidget) are now in a new library (Qt Multimedia Widgets).

New features in 5.0

There are a number of new features in Qt Multimedia 5.0:

Removed features

A number of classes or features previously offered in Qt Multimedia or Qt Multimedia Kit have been removed.

Removed featureNotes
QMediaImageViewerThis class (and related controls and services) were removed since their functionality was not suitable for many applications

Changed features

A number of classes previously offered in Qt Multimedia or Qt Multimedia Kit have changed in ways that may affect previously written code. There may be other changes (like new features) that will not affect previously written code, and they are documented elsewhere.

Changed featureNotes
qmake .pro file changesIf you've used QtMultimediaKit in the past, you needed to put
 CONFIG += mobility
 MOBILITY += multimedia

in your .pro file. Now you need to use:

 QT += multimedia

or

 QT += multimedia multimediawidgets

if you need to use the widget classes.

Namespace changesFor Qt Multimedia Kit the majority of the classes were in the normal Qt namespace (usually nothing, unless built specially). There was a Qt Multimedia Kit namespace for several enumerations. This namespace has now changed to Qt Multimedia, so if you've used one of the SupportEstimate, EncodingQuality, EncodingMode or AvailabilityError enumerations you'll need to change your code. In fact, running a global search and replace on QtMultimediaKit (to replace it with QtMultimedia) will go a long way with porting your code.
Meta-data enumeration changesIn Qt Multimedia Kit the available meta-data keys were in an enumeration in the QtMultimediaKit namespace. These meta-data keys have been changed to string literals in the QtMultimedia::MetaData namespace - generally your source code will mostly be compatible unless you have created variables or parameters with the QtMultimedia::MetaData type - you should replace these with QString.
Meta-data method changesIn Qt Multimedia Kit the available meta-data was split between methods to access standard, pre-defined keys, and methods to access extensible free form key meta-data. These have been combined into a single method to access meta-data given a string key, and a list of pre-defined keys. If you've used the extendedMetaData method of any class, you will need to change your code to combine the standard and extended metadata methods.
Qt Metatype registrationIn Qt Multimedia 5.0 we've tried to make sure that we register any classes or types that would be useful to use in cross process signals or in QVariants. If you've previously added Q_DECLARE_METATYPE macros for any Qt Multimedia class you will probably need to remove them.
Video QML typeIf you've previously used Video you may be excited to learn that it should still work as expected, but you also have the choice of using MediaPlayer and VideoOutput together for more flexible and advanced use cases.
QSoundEffectThe SoundEffect QML type was public and accessible in Qt Multimeda Kit, and now the C++ version is also available. If you managed to use the private class previously, you'll need to update your code.
Camera controlsA large number of the camera controls (QCameraImageProcessingControl, QCameraFocusControl etc) have been updated to address a number of design flaws. If you have previously been using these classes, you should check the new design. In particular, a number of discrete accessor methods have been collapsed into parametrized methods, and the range or data type of some parameters has been adjusted.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web