In the previous section, we have learned how to create an audio player. In this chapter, we will further improvise our program and create a video player using Qt and C++.
The video player
Designing a user interface for video players
The next example is that of the video player. Since QMediaPlayer also supports video output, we can use the same user interface and C++ code from the previous audio player example, and just make some minor changes to it.
- First, open project file (.pro) and add in another keyword, called multimediawidgets:
QT += core gui multimedia multimediawidgets
- Then, open up mainwindow.ui and add a Horizontal Layout (name it as movieLayout) above the timeline slider. After that, right-click on the layout...