klauer / qtpynodeeditor

Python Qt NodeEditor (qtpy, PyQt5, PySide)
https://klauer.github.io/qtpynodeeditor/
Other
192 stars 54 forks source link

Nodes not drawn with newest pyqt5 #40

Closed akrinke closed 4 years ago

akrinke commented 4 years ago

After updating pyqt5 from 5.14.2 to 5.15.5 5.15.0, nodes are no longer drawn correctly:

calculator-no-nodes

Console output:

qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 1083, resource id: 0, major code: 20 (GetProperty), minor code: 0
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setClipRect: Painter not active
QPainter::font: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
... (and many more lines like that)

Is something wrong with my installation, or can you reproduce this issue?

Environment

Arch Linux, Python 3.8.4, pyqt5 5.15.5 5.15.0, qtpy 1.9.0, qtpynodeeditor freshly cloned

klauer commented 4 years ago

5.15.5 isn't on conda-forge or PyPI, so I attempted to reproduce with 5.15.0 from PyPI:

$ python --version
Python 3.8.5
$ python -c 'import qtpy; print(qtpy.QT_VERSION, qtpy.API)'
5.15.0 pyqt5
$ python qtpynodeeditor/examples/calculator.py

These versions at least are working for me on OSX:

image

A brief check on the upstream library issues (https://github.com/paceholder/nodeeditor/ from which qtpynodeeditor was ported) doesn't show anything similar.

Would you mind seeing if 5.15.0 is similarly problematic?

akrinke commented 4 years ago

Sorry, I got it wrong. 5.15.0 is the latest version of pyqt5 and that is the version that causes problems for me.

I just compiled nodeeditor and the calculator example shows the same problem.

klauer commented 4 years ago

Hmm, OK, so our only apparent difference is then Linux vs OSX. I'll have to try it on Linux later and see if it's platform-related.

akrinke commented 4 years ago

I am back from vacation and finally have time to take a closer look. As it turns out, there was a problem with my QT environment and a non-standard DPI setting (details). So, nothing wrong with qtpynodeeditor. Thank you for your help!

klauer commented 4 years ago

Ah-ha! Thanks for following up and letting me know the cause.