Book Image

Qt5 C++ GUI Programming Cookbook

By : Lee Zhi Eng
Book Image

Qt5 C++ GUI Programming Cookbook

By: Lee Zhi Eng

Overview of this book

With the advancement of computer technology, the software market is exploding with tons of software choices for the user, making their expectations higher in terms of functionality and the look and feel of the application. Therefore, improving the visual quality of your application is vital in order to overcome the market competition and stand out from the crowd. This book will teach you how to develop functional and appealing software using Qt5 through multiple projects that are interesting and fun. This book covers a variety of topics such as look-and-feel customization, GUI animation, graphics rendering, implementing Google Maps, and more. You will learn tons of useful information, and enjoy the process of working on the creative projects provided in this book
Table of Contents (16 chapters)
Qt5 C++ GUI Programming Cookbook
About the Author
About the Reviewer

Video conversion

In this recipe, we will create a simple video converter using Qt and FFmpeg, a leading multimedia framework that is free and open source. Although Qt does support playing video files through its widget, it does not support video conversion at the moment. Fear not! You can actually still achieve the same goal by making your program cooperate with another standalone program through the QProcess class provided by Qt.

How to do it…

Let's make a simple video converter with the following steps:

  1. Download FFmpeg (static package) from and extract the contents to C:/FFmpeg/.

  2. Then, open up Qt Creator and create a new Qt Widgets Application project by going to File | New File or Project….

  3. After that, open up mainwindow.ui and we're going to work on the program's user interface. Its UI is very similar to the previous example, except we add an extra text edit widget to the canvas, just below the combo box:

  4. Double-click the combo box and a window will appear...