Qt 5.4 Adding VideoFile to project
-
Hi, sorry for newbie question...how Can I add the video file to a project?? I tried to add it to .src file but doesnt not work (Size probably...). I need a path to /video.mp4 in a project folder, but not absoluteFilePath. Or what is the proper way to include a video file to a project. I'd like to send my app with the videofile to someone.
Thanks for help. -
Hi,
What size is that video file ?
-
Then generally, files that size are deployed along your application, not compiled in
-
I figured that out. The question is how to deploy video file so it would show up in a debug/release folder. I found something like this on the net, added to .pro file:
copydata.commands = $(COPY_DIR) $$PWD/data $$OUT_PWD first.depends = $(first) copydata export(first.depends) export(copydata.commands) QMAKE_EXTRA_TARGETS += first copydata
LINK and I am trying to make it work.
-
What problem are you getting ?
-
Sorry for the delay. The only problem is with the last line:
QMAKE_EXTRA_TARGETS += first copydata
error:** [copydata] Error 4.**Makefile.Debug:101: recipe for target 'copydata' failed mingw32-make[1]: *** [copydata] Error 4 mingw32-make[1]: Leaving directory 'D:/Projects/build-Test2-Desktop_Qt_5_4_0_MinGW_32bit-Debug' mingw32-make: *** [debug] Error 2 makefile:34: recipe for target 'debug' failed Im browsing the net for a solution. I have created in my project "*copydata*" directory.
Thanks for your time SGaist.
EDIT: I have probably found a solution to my problem: LINK
I will try to make that work, read all documentation on qmake and learn it. -
If it's path issue, shell_path can help your there