summaryrefslogtreecommitdiffstats
path: root/src/imports/multimedia/qdeclarativevideo.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-04-27 21:42:15 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-04-27 21:42:15 (GMT)
commit6857fd7b99ba0c72c2f09cfc7ad38e9df4f0531c (patch)
tree1c695319c22417a406b298860c59fe507a012354 /src/imports/multimedia/qdeclarativevideo.cpp
parent113fe7369e0eaeb6a77d97e3d73cedb062c21abb (diff)
downloadQt-6857fd7b99ba0c72c2f09cfc7ad38e9df4f0531c.zip
Qt-6857fd7b99ba0c72c2f09cfc7ad38e9df4f0531c.tar.gz
Qt-6857fd7b99ba0c72c2f09cfc7ad38e9df4f0531c.tar.bz2
update multimedia qml element doc samples
Reviewed-by:Derick Hawcroft
Diffstat (limited to 'src/imports/multimedia/qdeclarativevideo.cpp')
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
index 9b02795..1b51e2c 100644
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -79,7 +79,24 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
import Qt 4.7
import Qt.multimedia 4.7
- Video { source: "video/movie.mpg" }
+ Video {
+ id: video
+ width : 800
+ height : 600
+ source: "video.avi"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ video.play()
+ }
+ }
+
+ focus: true
+ Keys.onSpacePressed: video.paused = !video.paused
+ Keys.onLeftPressed: video.position -= 5000
+ Keys.onRightPressed: video.position += 5000
+ }
\endqml
The Video item supports untransformed, stretched, and uniformly scaled video presentation.