# QML1 vs QML2

## Dependencia de OpenGLES2 al contrario que QML1

Para migrar una aplicación QtQuick 1 a QtQuick 2 y hacer uso de las nuevas características de QtQuick 2, hay algunos cambios necesarios en los ficheros QML, que listamos a continuación:

| **QtQuick 1**               | **QtQuick 2**                   |
| --------------------------- | ------------------------------- |
| import QtQuick 1.0          | import QtQuick 2.6              |
| import QtQuick 1.0          | import QtQuick.XmlListModel 2.0 |
| import QtQuick 1.0          | import QtQuick.LocalStorage 2.0 |
| import QtQuick.Controls 1.0 | import QtQuick.Controls 1.2     |

## Nuevos elementos QML en QtQuick2

Un nuevo sistema de efectos de sombreado (Shader effects system): <http://doc.qt.io/qt-5.0/qtquick-effects-shaders.html>.

**Canvas**: Proporciona un elemento de lienzo 2D.

**CanvasGradient**: Interfaz de lienzo degradado opaco Context2D (Context2D opaque CanvasGradient).

**Context2D**: La API Context2D API nos permite dibujar formas gráficas 2D en el ítem Cambas.

**TextMetrics**: Interfaz de Context2D TextMetrics.

**MultiPointTouchArea**: Habilita manejar múltiples puntos táctiles.

**TouchPoint**: El elemento TouchPoint describe un punto táctil en un área táctil multipuntos (MultiPointTouchArea).

**PathAnimation**: Anima posiciones a lo largo de un trazado.

**PathInterpolator**: Permite la animación manual a lo largo de un trazado.

**AnimationController**: Permite un control manual del progreso de animaciones.

**PathArc**: Define un arco en un trazado (Path).

**PathCurve**: Define un punto en una curva Catmull-Rom curve en un trazado (Path).

**PathSvg**: Define un sub-trazado especificado como un trazado de datos SVG en un trazado (Path):

**Accessible**: Propiedad adjunta para hacer los componentes accesibles.

**AnimatedSprite**: Este elemento dibuja una animación tipo “sprite”.

**Sprite**: Representa una animación tipo “sprite”.

**SpriteSequence**: Dibuja una animación de tipo “sprite”.

**DragEvent**: Proporciona información sobre el evento de arrastrar.

**DropArea**: Proporciona manejo de operaciones de arrastrar y soltar (drag and drop).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.velneo.com/21/velneo-vdevelop/scripts/lenguajes/qml/qml1-vs-qml2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
