Maya ships with Qt libraries and header files. These libraries may be different than other Qt libraries installed on your system. This is why it is important that the directory containing the headers packaged with Maya appear in your include path before other Qt header directories, and that the directory containing Maya's version of the libraries appears in your library path before other Qt library directories.
Use the qmake provided with the Maya devkit to build Qt plug-ins. qmake is located in the devkit's bin directory on all platforms.
Note: Qt plug-ins must be built in the Visual Studio x64 Command Prompt on Windows. Use the Windows search function to find its location on your system.
Before building Qt examples, set up your environment according to the instructions in Setting up your build environment.
To build a Qt example:
For example, on Linux or macOS, you would run:
```sh $DEVKIT_LOCATION/devkit/bin/qmake helixQtCmd.pro ``` On Windows, you would run: ```sh %DEVKIT_LOCATION%\devkit\qmake.exe helixQtCmd.pro ``` On macOS, the makefile will have the name of the project with the `.mak` extension added. For example, `helixQtCmd.mak`. On Linux and Windows, the makefile will be named `Makefile` regardless of the name of the example.
Run make on the makefile to build the plug-in.
On Linux, run make –f Makefile
On macOS, run make –f helixQtCmd.mak
On Windows, run nmake /f Makefile