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

Replace deprecated QFontMetrics.width with horizontalAdvance #2625

Merged

Conversation

dgovil
Copy link
Collaborator

@dgovil dgovil commented Aug 25, 2023

Description of Change(s)

usdview was using a deprecated width method on QFontMetrics that was finally dropped in Qt6.
This PR (thanks to John Hood for the fix) replaces it with horizontalAdvance

This method has been available since Qt 5.11 and is the recommended replacement per https://doc.qt.io/qt-5/qfontmetrics-obsolete.html#width

Since this encompasses every version of the VFX Platform setup, I haven't tried to maintain compatibility behind 5.11

Fixes Issue(s)

  • Allows python auto-complete again with Qt 6
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@dgovil dgovil changed the base branch from release to dev August 25, 2023 16:26
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8628

@pixar-oss pixar-oss merged commit 62c5513 into PixarAnimationStudios:dev Nov 28, 2023
36 checks passed
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.

3 participants