Use Qt Creator to Build C++ Samples in Windows

Introduction

This tutorial shows how to configure and build the Zivid C++ Samples with Qt Creator 4.12.1.

Pre-requisites

Follow requirements and installation steps in Configure C++ Samples With CMake and Build Them in Visual Studio in Windows, including instructions for OpenCV.

Configure the project in Qt Creator

Start Qt Creator.

Qt Creator の起動画面のスクリーンショット。

Click FileOpen Project.

Qt Creator のファイル メニューを開くスクリーンショット。

Navigate to your clone of the C++ Samples and open CMakeLists.txt.

Qt Creator を開いた CMakeLists.txt のスクリーンショット。

Configure Kits

Click Manage Kits… and configure your Desktop Kit as per the figure below.

Compiler:

Microsoft Visual C++ Compiler (x86_amd64)

Qt Creator Kit 構成のスクリーンショット。

For CMake generator click Change… and set the following entries:

Generator:

Ninja

Extra generator:

CodeBlocks

Qt Creator セット CMake Generator のスクリーンショット。

To include Eigen and OpenCV for CmakeConfiguration click Change… and add the following:

EIGEN3_INCLUDE_DIR:STRING=C:/Users/Public/Downloads/eigen-git-mirror
OpenCV_DIR:STRING=C:/Users/Public/Downloads/opencv/build
Qt Creator が設定した Eigen パスと OpenCV パスのスクリーンショット。

Click OK, and again OK.

Configure Project

Select Desktop and expand Details. Then, check Debug and Release.

Qt Creator プロジェクト構成のスクリーンショット。

Click Configure Project.

完成した Qt Creator プロジェクト構成のスクリーンショット。

Click BuildBuild All Projects

Qt Creator ビルドのすべてのプロジェクトのスクリーンショット。

Expand CppSamples and select a C++ program to view it.

Qt Creator 選択アプリケーションのスクリーンショット。

Run the sample program

Select a sample program, e.g. CaptureVis3D. Right-click on the program, then click Run.

Qt Creator 実行アプリケーションのスクリーンショット。

Alternatively, navigate to the Release folder in File Explorer.

エクスプローラーから Qt Creator 実行アプリケーションのスクリーンショット。

Run a sample program, e.g. CaptureVis3D.exe.

CaptureVis3D サンプルのスクリーンショット。

Close the window.