X Tutup
Skip to content

qt shims: QFontMetrics missing on PyQt5 #7875

@akhmerov

Description

@akhmerov

Bug report

Bug summary

When using PyQt5, QFontMetrics is not available in matplotlib.backends.qt_compat.QtWidgets. Originally reported in matplotlib/viscm#23

Code for reproduction

from matplotlib.backends.qt_compat import QtWidgets
QtWidgets.QFontMetrics

Actual outcome

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-6ef96c02dc84> in <module>()
----> 1 QtWidgets.QFontMetrics

AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QFontMetrics'

Expected outcome

PyQt5.QtGui.QFontMetrics

Software versions

ubuntu xenial
matplottib: 2.0.0 (also verified on 1.5.3), installed via pip
PyQt5: 5.5.1+dfsg-3ubuntu4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup