-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
PR: Aliased QUndoCommand
, provided QLineEdit.getTextMargins()
and QFontMetricsF.width()
#366
PR: Aliased QUndoCommand
, provided QLineEdit.getTextMargins()
and QFontMetricsF.width()
#366
Conversation
QUndoCommand
, provided QLineEdit.getTextMargins()
and QFontMe…
QUndoCommand
, provided QLineEdit.getTextMargins()
and QFontMe…QUndoCommand
, provided QLineEdit.getTextMargins()
and QFontMetricsF.width()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @random-developer for your help with this! I think the only missing thing here is to add some testing:
- For
QtWidgets.QUndoCommand
andQtWidgets.QLineEdit.getTextMargins
at: https://github.com/spyder-ide/qtpy/blob/master/qtpy/tests/test_qtwidgets.py - For
QtGui.QFontMetricsF.width
at: https://github.com/spyder-ide/qtpy/blob/master/qtpy/tests/test_qtgui.py similar toLines 14 to 20 in fdd6818
def test_qfontmetrics_width(qtbot): """Test QFontMetrics width""" assert QtGui.QFontMetrics.width is not None font = QtGui.QFont("times", 24) font_metrics = QtGui.QFontMetrics(font) width = font_metrics.width("Test") assert width in range(40, 62)
Other than that this looks good to me 👍
The QUndoCommand test is failing. I'm not sure why; will investigate later; too pressed for time right now. |
dd4ab16
to
4430e95
Compare
4430e95
to
458e3de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @random-developer ! This LGTM 👍
Fixes #365