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

Pyface Tasks split_editor_area_pane calls Qt methods removed in Qt5 #327

Closed
ericjmcd opened this issue Jul 20, 2018 · 1 comment
Closed

Comments

@ericjmcd
Copy link
Contributor

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.

@ericjmcd 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
@corranwebster
Copy link
Contributor

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.

corranwebster added a commit that referenced this issue Jul 25, 2018
…or_tab_drag

Bugfix the Closes #327 for split_editor_area_pane not supporting Qt5 …
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

No branches or pull requests

2 participants