This article is based on the teach pendant secondary development library, and primarily explains how to create a demo program and user-customized process interfaces.
You can download the SDK library files and examples from the following link: https://www.openroboticsalliance.com/pendant/download

1. Creating a Demo Program
1.1 Open QtCreator on an Ubuntu (32-bit) system

1.2 Click on "Welcome" on the left and then select the "New Project" button

1.3 Choose "Application," select "Qt Widgets Application," and click the "Choose" button in the lower right corner

1.4 Enter the project name, choose the project path, and click the "Next" button

1.5 Choose the compilation tool "Desktop" and click the "Next" button

1.6 Click "Next"

1.7 Click "Finish" to complete the demo project creation

2. Adding Static Library Files to the Demo Program
2.1 Download library files: https://www.openroboticsalliance.com/pendant/download

2.2 Create a "nextpLib" folder in the project directory

2.3 Inside the "nextpLib" folder, create "include" and "Library" folders

2.4 Unzip the SDK, copy the header files to the "include" folder and the library files to the "Library" folder


2.5 Add static library files to the program configuration. Add the following content to the NextpMode.pro project file

2.6 Delete "mainwindow.h," "mainwindow.cpp," and "mainwindow.ui" from the "NextpMode.pro" file and remove the corresponding files from the project directory

3. Adding Management Classes and Custom Interfaces to the Demo Program
3.1 Create a C++ class file by right-clicking on the project and selecting "Add New..."

3.2 Enter the class name as "WidgetManager," choose "QObject" as the base class, and click "Next"

3.3 Create a custom interface by right-clicking and selecting "Add New..."

3.4 Choose "Qt," "Qt Designer Form Class," and click "Choose"

3.5 Select the template "QStackedWidget" and click "Next"

3.6 Enter the class name as "SettingParaWidget" and click "Next"

3.7 Click "Finish" to complete the process

4. Linking the Interface with the Secondary Development Library
4.1 Adjust the interface size to 714*504 by modifying the "SettingParaWidget"

4.2 Bind the SettingParaWidget interface with the development library. Add signal-slot connections in the WidgetManager class. You can refer to the demo example we provided for implementation. The following is the main code snippet that focuses on displaying and hiding the custom interface


4.3 Final result






