Using Qt with 3ds Max Plug-ins
Starting with 3ds Max 2017, you can use the popular cross-platform development package Qt to create the user interface for your 3ds Max plug-in. See the maxsdk\include\Qt directory for headers exposing utilities for integrating Qt, as well as some customized Qt widgets used in the 3ds Max UI. Some of the standard plug-ins shipped with 3ds Max use Qt for their UI, and you can look at these in the SDK samples collection. Look at the maxsdk/samples/systems/sunlight project for an example of a plug-in that uses Qt for its UI. There is also a very simple sample located in maxsdk/howto/objects/qtObjectDemo.
3ds Max uses a patched version of Qt 5.11.2 that is binary compatible with the standard GPL distribution of Qt 5.11.2. Before you can create new plug-ins or build existing ones that require Qt, you need to download Qt 5.11.2, and install the Visual Studio 2017 Qt add-on.
Getting and Configuring Qt for 3ds Max
- Download and install Qt 5.11.2 from www.qt.io/download/.
Note: The Qt Maintenance tool makes it easy to install and update Qt.
Note: When installing Qt 5.11.2, the only component you need to install is MSVC 2017 64-bit, the pre-built components for Visual Studio 2017 64-bit compiler.
- In Visual Studio, go to Tools > Extension and Updates ... > Online and search for Qt. Install the Qt Visual Studio Tools (2017) add-on. You will need to re-start Visual Studio.
- The version and location of Qt is set by the Qt Visual Studio Tools add-on, using the $(QTVER) and $(QTDIR) macros, which are picked up by the <maxsdk>\ProjectSettings\propertySheets\3dsmax.general.project.settings.props property sheet. You can override these values in the property sheet if you need to:
- By default, the SDK's $(QTDIR) is defined as <maxsdk>\Qt\<QtVersion>. So you can copy the contents of your Qt install to this location. Or:
- Change the definition of $(QTDIR) in <maxsdk>\ProjectSettings\propertySheets\3dsmax.general.project.settings.props to point to the installed version of Qt.