[PyQt] Event problem with QGLWidget in stacked widget on OS X

Chris Pezley chris.pezley at quantumwise.com
Fri May 6 12:55:51 BST 2016


I believe I have discovered a problem effecting PyQt on OS X. The issue 
is being able to get a QGLWidget into a state that causes all mouse over 
events to handle like mouse click events. This only occurs when using 
PyQt (normal Qt works).

In essence, it occurs when having a QGLWidget in a stacked widget and 
switching that in an event handle by directly calling the stacked 
widget. The problem does not persist if signals are used. (Probably 
doesn't make sense until you look at the attached examples.)


The Problem:
Mouse over events are causing mouse click events in certain circumstances.

To Reproduce:
Run the program in the attachments. Right click when over the GLWidget 
twice, and then move the mouse in and out of the GLWidget. Note: this 
only occurs in the python code.

Effected platforms:
OS X 10.10.5
OS X 10.11.4

Environment:
Qt 5.5.0 (this alone does not cause problems)
sip 4.16.9 + PyQt 4.11.4
sip 4.18 + PyQt 5.6 (only tested on 10.10.5)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qglwidget_error.py
Type: text/x-python
Size: 934 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160506/98849453/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qglwidget_error_qt5.py
Type: text/x-python
Size: 993 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160506/98849453/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qglwidget_error.cpp
Type: text/x-c++src
Size: 1068 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160506/98849453/attachment.cpp>


More information about the PyQt mailing list