9-3 Building a Basic Template Project: Hello NexVDO SDK!

Welcome to the third chapter! In the previous chapter on "Development Environment Setup," we successfully prepared all our development weapons ( Qt Creator and CMake ). Now, it's time to officially enter the development phase!

As the saying goes, "The first step is always the hardest." Before writing our first line of video capture code, we must first introduce our Qt project to the underlying libraries of the NexVDO SDK. To solve environment configuration headaches once and for all, we won't write any complex audio/visual logic in this chapter. Instead, we will focus on one core goal: "Building a perfect blank template project."

In the following steps, we will guide you from scratch to create a Qt project, import the SDK's include and lib folders, and teach you how to correctly modify the CMakeLists.txt file.

Our ultimate goal is to compile and run a "black blank window"! Don't underestimate this black screen; when it pops up successfully, it means your software is perfectly connected to the powerful underlying NexVDO SDK! Even better, this project will become your strongest backup in the future. Whether you are going to develop Capture, Record, Stream, or AI Analysis functions, you can simply duplicate this template to skip the tedious setup process, achieving a truly "painless start."

Ready to build your exclusive development base? Open your Qt Creator, and let's get started right away!

Creating the QT Project and Environment Configuration

Create Project

Open QT Creator ( this tutorial uses QT version 6.7.3 ) and create a brand new Qt Widgets Application project. In the setup wizard, select CMake as the Build system, and name the main Class as MainWindow.

 

 

 

 

 

 

Importing the SDK Library

After extracting the NexVDO SDK package you received, copy the two folders inside it, include and lib, entirely into the QT project folder you just created.

 

 

Modifying CMakeLists.txt

Open the CMakeLists.txt file in your project. We need to let the system know the location of the SDK and link the compiled libraries. Please add the following syntax:

• Set Directories: Add set(QCAP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qcap) and include_directories(${QCAP_DIR}/include)



• Link Libraries: At the very bottom of the file, add target_link_libraries( ... ${QCAP_DIR}/lib/libqcap.so)

 

After we have painstakingly modified CMakeLists.txt and successfully linked the system to the SDK's LIB file ( libqcap.so ), please don't rush into UI design just yet!

At this stage, we should first conduct a project test to confirm that the environment setup steps mentioned above are completely correct. Please directly click the green triangle "Run" button at the bottom left of Qt Creator.

If there are no errors during compilation and a completely black, empty MainWindow successfully pops up, congratulations! This means your project has perfectly and correctly linked with the NexVDO SDK. Next, we can confidently proceed to canvas design and feature development!

Building the UI Display Interface

Since it is a Graphical User Interface ( GUI ) application, we need a "canvas" to display the video. Please double-click to open mainwindow.ui in your QT project to enter Design mode.



Drag a QFrame component from the left toolbar onto the main window, and in the right property panel, name its objectName as PreviewWindow.

Please directly click the green triangle "Run" button at the bottom left of QT Creator again, and a MainWindow with the canvas positioned will successfully pop up.

Mission Accomplished: Your Exclusive Development Base is Ready!

Congratulations! At this point, our "Basic Template Project" has been officially built.

Not only have we confirmed the perfect connection of the underlying SDK library through the "Black Screen Test," but we have also firmly secured the exclusive canvas ( PreviewWindow ) on the UI for future video display. We strongly recommend that you back up the current state of this project. In the future, whether you want to develop recording, streaming, or AI analysis applications, you can start directly from this clean template, skipping all the tedious environment setups!

Everything is ready; all we need now is the final touch. In the upcoming Chapter 10-4, we will officially introduce the "Four Core Lifecycle APIs" of the NexVDO SDK. We will open the C++ code files and perfectly project the real video from the capture card onto the canvas you just created! Are you ready? See you in the next chapter!

Copyright © 2026 YUAN High-Tech Development Co., Ltd.
All rights reserved.