How to use SDK with Qt Creator

This tutorial will create a Qt project with Qt Creator to start using SDK.

You could find the project demo in <sdk>/platforms/projects/qtcreator directory.

Preparation

  • Windows: install the win pack of SDK
  • Linux: build from source and make install

Create Project

Open Qt Creator, then New Project,

image0

Choose Qt Widgets Application,

image1

Set project location and its name,

image2

Select the build kits,

image3

Then, it will generate the skeleton source files,

image4

image5

Finally, you will see the new project like this,

image6

Config Project

Edit mynteyed_demo.pro to add INCLUDEPATH and LIBS.

win32 {
    SDK_ROOT = "$$(MYNTEYED_SDK_ROOT)"
    isEmpty(SDK_ROOT) {
        error( "MYNTEYED_SDK_ROOT not found, please install SDK firstly" )
    }
    message("SDK_ROOT: $$SDK_ROOT")

    INCLUDEPATH += "$$SDK_ROOT/include"
    LIBS += "$$SDK_ROOT/lib/mynteye_depth.lib"
}

unix {
    INCLUDEPATH += /usr/local/include
    LIBS += -L/usr/local/lib -lmynteye_depth
}

Start using SDK

Include the headers of SDK and start using its APIs, could see the project demo.

Windows

Should select “Release” to run the project.

image7

Then you will see the main window,

image8

Linux

Run the project and you will see the main window,

image9