Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Adapt TaurusGraphicsAttributeItem to be compatible with python3 #881

Merged
merged 5 commits into from
Mar 20, 2019

Conversation

cmft
Copy link
Member

@cmft cmft commented Mar 13, 2019

Adapt QGraphicsTextBoxing and TaurusGraphicsAttributeItem classes
to be compatible with py2/py3.

Adapt QGraphicsTextBoxing and TaurusGraphicsAttributeItem classes
to be compatible with py2/py3.
@cpascual cpascual added py3 This issu affects especifically to python3 support bug labels Mar 13, 2019
self._text = Qt.QGraphicsTextItem(self)
if scene is not None:
scene.addItem(self._text)
# self._text.scale(self._TEXT_RATIO, self._TEXT_RATIO)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is now commented... can it really be safely ignored?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was commented by mistake

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it must be changed since it fails with py3

cmft and others added 4 commits March 13, 2019 16:44
This line was commented by mistake. Uncomment it.
QGraphicsItem.scale(sx, sy) is obsolete even in Qt4.
Replace it for equivalent code.
- use QtGui.QTransform from Qt
- avoid redundant assigning of variable
@cpascual
Copy link
Member

I've checked with:

python -m taurus.qt.qtgui.graphic.jdraw.jdraw_view ~/src/taurus/lib/taurus/qt/qtgui/graphic/jdraw/test/res/SimpleScalarViewer.jdw

With the develop version, this works only for py2+qt4 but it fails for py3+qt4, py3+qt5, py2+qt5
... while with this PR, it works for all combinations, so I am merging.

Thanks!

@cpascual cpascual merged commit ff3edaf into taurus-org:develop Mar 20, 2019
@cpascual cpascual added the PyQt5 this issue is specific PyQt5 support label Mar 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug py3 This issu affects especifically to python3 support PyQt5 this issue is specific PyQt5 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants