You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My tasks-based GUI crashes when dragging tabs within the split-editor pane using pyface 6.0.0 and PyQt5.11.2.
split_editor_area_pane uses QPixmap.grabWidget which has been removed in Qt5.
A simple fix is to replace that line with "widget.grab()" pixmap1 = QtGui.QPixmap.grabWidget(tabBar, tab_rect)
becomes pixmap1 = tabBar.grab()
Additionally, the QStyleOptionTabBarBaseV2 is called which has also been removed in Qt5. It appears simply replacing it with QStyleOptionTabBarBase is fine. I found a list of functions that are obsolete in Qt5 from someone's backport code - I'm currently patching all of these to use the 'non-versioned' ones that are still available in Qt5.
Sorry for not trying to fix this and do a pull-request, I'm not sure how you are handling the pyqt5 migration and don't know how to best make this backwards compatible.
The text was updated successfully, but these errors were encountered:
ericjmcd
changed the title
Pyface QtGui (pyqt5) does not have referenced functions (e.g. QStyleOptionTabBarBaseV2)
Pyface Tasks split_editor_area_pane calls Qt methods removed in Qt5
Jul 20, 2018
Thanks for the report - we're trying to keep things running on both Qt5 and Qt4 for at least a little while. For the "V2" functions and classes, we have already got a fix in master for these: #323
I'd be interested in seeing your patches, even if it's not Qt4 compatible. A PR would be excellent, but even a diff of the patch on this bug report would be useful.
My tasks-based GUI crashes when dragging tabs within the split-editor pane using pyface 6.0.0 and PyQt5.11.2.
split_editor_area_pane uses QPixmap.grabWidget which has been removed in Qt5.
A simple fix is to replace that line with "widget.grab()"
pixmap1 = QtGui.QPixmap.grabWidget(tabBar, tab_rect)
becomes
pixmap1 = tabBar.grab()
Additionally, the QStyleOptionTabBarBaseV2 is called which has also been removed in Qt5. It appears simply replacing it with QStyleOptionTabBarBase is fine. I found a list of functions that are obsolete in Qt5 from someone's backport code - I'm currently patching all of these to use the 'non-versioned' ones that are still available in Qt5.
Sorry for not trying to fix this and do a pull-request, I'm not sure how you are handling the pyqt5 migration and don't know how to best make this backwards compatible.
The text was updated successfully, but these errors were encountered: