Closed klauer closed 4 years ago
Travis isn't showing results here - wonder if it's because I'm PR'ing to my own repository. Anyway, this is passing with the CI fix in f12bab2: https://travis-ci.org/github/klauer/qtpynodeeditor/builds/671860068
QFontMetrics.horizontalAdvance()
is introduced in Qt-5.11. It's a rather new version, not always available in stable repos. For example in latest Anaconda, just PyQt-5.9 LTS conda package is provided, which is required by spyder4 etc, so pip-installing newer PyQt is not an option. So to use qtpynodeeditor in stable Anaconda this commit would be better reverted.
Closes #33
Did a quick comparison between the alternates
QFontMetrics.horizontalAdvance(str)
vsQFontMetrics.boundingRect(str).width()
and didn't find much of a difference at least in the example case: