Skip to content

Conversation

@mara004
Copy link
Contributor

@mara004 mara004 commented May 2, 2021

Move away from the deprecated QGLWidget and replace it with QOpenGLWidget
This is a very rough fix for the Wayland OpenGL issues described in #207

Move away from the deprecated QGLWidget and replace it with QOpenGLWidget
This fixes the Wayland OpenGL issues described in #207 (in a very rough way)
@mara004
Copy link
Contributor Author

mara004 commented May 2, 2021

As per inspection in gdb, it seems to correctly use OpenGL.

@mara004
Copy link
Contributor Author

mara004 commented May 2, 2021

I am still unhappy with the import: What if PyQt5 is used, but PySide2 is installed, too? I think this could likely cause problems.

@ArnoChenFx
Copy link
Contributor

ArnoChenFx commented May 3, 2021

I am still unhappy with the import: What if PyQt5 is used, but PySide2 is installed, too? I think this could likely cause problems.

Judge which one to use according to Qt.IsPySide2 and Qt.IsPyQt5.
https://github.com/mottosso/Qt.py/blob/64e8162d1060884f65bf88224b24a2e97dacba70/Qt.py#L1922

@mara004
Copy link
Contributor Author

mara004 commented May 3, 2021

@ArnoChenFx Cool, thanks. That's what I was looking for.

Use Qt.IsPySide2 / Qt.IsPyQt5 rather than try/except
@mara004 mara004 changed the title Quick and dirty fix for #207 Quick fix for #207 May 3, 2021
@davidedmundson
Copy link

typo QGLWdiegt

I wouldn't call it a quick and dirty fix, the docs for QGLWidget say:

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

So it's right to port away.

I'm surprised you need the if statement, QOpenGLWidget has been there since 5.4

pardon
@mara004
Copy link
Contributor Author

mara004 commented May 3, 2021

Sorry about the awkward typo.

I wouldn't call it a quick and dirty fix

I named it like this because I am very unfamiliar with Qt/OpenGL and do not know whether I really did it correctly. Perhaps I am missing some argument, context or whatever, so it should be carefully checked, although it seems to work for me. I don't want to create new issues by providing a botched fix.

I'm surprised you need the if statement, QOpenGLWidget has been there since 5.4

That's probably because the Qt.py wrapper still supports PyQt4/PySide(1), see mottosso/Qt.py#341

@mara004
Copy link
Contributor Author

mara004 commented May 5, 2021

@jchanvfx Could you please take a look?

@jchanvfx jchanvfx merged commit 63ea968 into jchanvfx:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants