Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify Qt 5.12 as the minimum required version for Qt-dependent features #272

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

mattyjams
Copy link
Contributor

The newly added import dialog functionality makes use of QOverload which was introduced in Qt 5.7, and QSortFilterProxyModel::setRecursiveFilteringEnabled() which was introduced in Qt 5.10. Some users may still be using VFX platform 2018 which specifies Qt 5.6.1 as the required version, so they may not be able to build the Qt-dependent features until they switch to VFX platform 2019+ which specifies Qt 5.12 instead.

This change adds CMake enforcement of Qt 5.10+ when building with Qt enabled, and adds a table of version numbers for the optional dependencies, of which Qt is currently the only one.

Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattyjams. looking good, it makes sense to me.

@seando-adsk
Copy link
Collaborator

@mattyjams Sorry my fault. When implementing this new dialog I wasn't thinking about older versions of Maya. Ideally the Qt used to compile the plugin should be the same one as inside the Maya version you are targeting. So for Maya 2018/2019 that would be Qt 5.6.1 and for Maya 2020 it is currently 5.12.6. This is a must because the mayaUsdUI.dll will get the Qt shared libs from within Maya.

I would suggest for now you set the minimum at 5.12 and say that (like the compiler) it must match the Qt version in Maya. Then in the build.md say something to the effect that the new Qt features are only supported in Maya 2020.

I will look at how to support this dialog in Qt 5.6.1.

@mattyjams
Copy link
Contributor Author

No problem @seando-adsk. I code reviewed #206 but obviously didn't try building it internally, so I only just caught this yesterday.

I'll update the CMakeLists.txt to require 5.12 (being a little flexible on the patch release version?) and add a note in build.md.

This got me wondering though whether it might eventually be possible to build against Maya's Qt directly rather than force clients to build their own version that matches. Maya already ships with the libraries, so maybe it's just the headers that are missing? In our Maya installation, I see a qt-5.6.1-include.tar.gz file in the include directory which looks like it has everything we need. Seems like it would be cleaner/safer to make FindMaya.cmake generate a Maya::Qt imported target from the Qt stuff in the Maya installation if that's an option. Then it wouldn't be necessary to build your own and point build.py at it.

@mattyjams mattyjams force-pushed the pr/specify_qt_min_version branch from c94c690 to 8a59205 Compare February 11, 2020 18:59
@mattyjams mattyjams changed the title identify Qt 5.10 as the minimum required version for Qt-dependent features identify Qt 5.12 as the minimum required version for Qt-dependent features Feb 11, 2020
@mattyjams
Copy link
Contributor Author

Rebased and amended the commit based on @seando-adsk's feedback. CMake now enforces Qt 5.12, and I added a note about Maya 2020 being the only currently supported version for the Qt features in build.md.

@seando-adsk
Copy link
Collaborator

@mattyjams Clients should not have to build Qt. The version from Maya is included with the devkit (as an optional download). However I know it requires some steps to get it working, such as extracting those qt-XXX-tar.gz files. And in the case of the 5.12.6 with Maya 2020 devkit the Qt cmake files reference the debug libs which are not shipped with the devkit. So some manual changes are needed. I've brought this issue up internally with the Maya team.

…tures

The newly added import dialog functionality makes use of QOverload which was
introduced in Qt 5.7, and QSortFilterProxyModel::setRecursiveFilteringEnabled()
which was introduced in Qt 5.10. Maya 2020 itself is built with Qt 5.12.6, so
it is recommended that mayaUsd be built with the same version of Qt.

The Qt features are not supported in Maya 2018 and 2019, since those versions
of Maya use Qt 5.6.1. VFX platform 2018 specifies Qt 5.6.1 as the required
version, so users on that platform may not be able to build the Qt-dependent
features until they switch to VFX platform 2019 which specifies Qt 5.12
instead.

This change adds CMake enforcement of Qt 5.12 when building with Qt enabled,
and adds a table of version numbers for the optional dependencies, of which Qt
is currently the only one.
@mattyjams mattyjams force-pushed the pr/specify_qt_min_version branch from 8a59205 to 44e597f Compare February 12, 2020 01:32
@kxl-adsk kxl-adsk merged commit fbb9393 into Autodesk:dev Feb 12, 2020
@mattyjams mattyjams deleted the pr/specify_qt_min_version branch February 12, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants