AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 294 forks source link

PySide6 has removed all functions marked "obsolete" in Qt5 #1296

Closed meshula closed 2 years ago

meshula commented 2 years ago

Bug Report

The following functions, at least, used by otioview have been removed in the latest version of PySide6.

QApplication::desktop()
QtGui.QFontMetrics::width()
QGraphicsView::matrix()

Trying to run otioview with the latest pyside6 emits many errors, such as

File "/opt/miniforge3/envs/otio-py310/lib/python3.10/site-packages/opentimelineview/timeline_widget.py", line 710, in frame_all
    zoom_level = 1.0 / self.matrix().m11()
AttributeError: 'CompositionView' object has no attribute 'matrix'.

I had a go at fixing things up, some are easy to correct, for example matrix becomes transform, width becomes horizontalAdvance. Others are not so straightforward, as no equivalent exists for desktop.

A compounding issue is that otioview was meant to run on both pyside2 and pyside6. Now that the API has diverged through removal of functions, we'll need to spend a little effort to make sure that both APIs still work, and at the same time not turn otioview into spaghetti.

meshula commented 2 years ago

These have been addressed. https://github.com/PixarAnimationStudios/OpenTimelineIO/pull/1221

I have a stale install with path precedence :sob:

Thanks @darbyjohnston