Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I have a requirement that to play a video using mplayer in an application(AppA). But the code for mplayer should be in another application(AppB). That means AppA is my main application and I have to run mplayer code from backend.

I am using Qt 4.7 version in Linux environment. In AppB I have hidden the widget in main function as below
Widget w;
w.hide();

And calling a playvideo function for every 5 mins in AppB. In playvideo function I am using system fucntion to play video as below.

void Widget::playvideo()
{
system("mplayer /path/to/the/video.avi");
}


And I am running AppB in backend (using exe name with & symbol) when AppA started. Here I am able to play video but video is blinking and some part of AppA ui is visible in middle.

But my requirement is to hide AppA ui while playing video from AppB. So can you please tell me how to solve this.

What I have tried:

(Duplicate from above removed)
Posted
Updated 22-Jul-19 5:18am
v2

1 solution

The command line isnt the full job, but you must launch the app in foreground and set the z-order of your app correctly.

Read this article aboutLinux Process and C functions to get some details.
 
Share this answer
 
Comments
Member 13740197 23-Jul-19 3:28am    
Thaks for the answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900