Skip to content

Instantly share code, notes, and snippets.

/JM_.pro Secret

Created April 15, 2015 12:49
Show Gist options
  • Save anonymous/e41fa0721bc895d7fe00 to your computer and use it in GitHub Desktop.
Save anonymous/e41fa0721bc895d7fe00 to your computer and use it in GitHub Desktop.
#-------------------------------------------------
#
# Project created by QtCreator 2015-04-08T14:58:45
#
#-------------------------------------------------
QT += core gui multimedia multimediawidgets network
QT += qml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = JM
TEMPLATE = app
SOURCES += main.cpp
QMAKE_CXXFLAGS += -std=c++0x
DISTFILES += \
video.qml
RESOURCES += \
res.qrc
#include <QApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QQmlApplicationEngine app;
app.load(QUrl("qrc:/qml/video.qml"));
return a.exec();
}
Program folder: ~/Desktop/QtApp/
Programs starts from ~/Desktop/QtApp/
<RCC>
<qresource prefix="/qml">
<file>video.qml</file>
</qresource>
</RCC>
import QtQuick.Window 2.0
import QtMultimedia 5.0
Window {
x: 0; y: 0;
width: 1920
height: 1080
visible: true
Video {
source: "./video/adv.mov"
autoPlay: true
anchors.fill: parent
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment