Hi there,

I've run into a strange bug, and I'm hoping someone here might have seen it before and can help me get past it. Basically, if I have a pyqt window with a QGLWidget, I get a "python has stopped working..." error when I resize the window rapidly. Curiously, it only happens if I resize via the corner, so height and width are changing at the same time. I know the qglwidget is the source of the problem because if I get rid of it, or just break the layout so it doesn't change size with the window, the problem goes away. I'm fairly sure it's not a code issue, but here's a simple example just to be sure:

Qt Code:
  1. import sys
  2. from PyQt4 import QtCore, QtGui, QtOpenGL
  3. from PyQt4.uic import loadUiType
  4.  
  5. Ui_MainWindow, QMainWindow = loadUiType('crashtest.ui')
  6.  
  7. class Main(QMainWindow, Ui_MainWindow):
  8. def __init__(self):
  9. super(Main, self).__init__()
  10. self.setupUi(self)
  11.  
  12. self.glWidget = QtOpenGL.QGLWidget()
  13. self.plotCanvas.addWidget(self.glWidget)
  14.  
  15. self.show()
  16.  
  17. def main():
  18. app = QtGui.QApplication(sys.argv)
  19. window = Main()
  20.  
  21. sys.exit(app.exec_())
  22.  
  23. if __name__ == "__main__":
  24. main()
To copy to clipboard, switch view to plain text mode 

and the .ui file is basically just a main window with an empty vertical layout:

Qt Code:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ui version="4.0">
  3. <class>MainWindow</class>
  4. <widget class="QMainWindow" name="MainWindow">
  5. <property name="geometry">
  6. <rect>
  7. <x>0</x>
  8. <y>0</y>
  9. <width>1051</width>
  10. <height>529</height>
  11. </rect>
  12. </property>
  13. <property name="windowTitle">
  14. <string>MainWindow</string>
  15. </property>
  16. <widget class="QWidget" name="centralwidget">
  17. <layout class="QGridLayout" name="gridLayout">
  18. <item row="0" column="0" rowspan="2">
  19. <layout class="QVBoxLayout" name="plotCanvas"/>
  20. </item>
  21. </layout>
  22. </widget>
  23. </widget>
  24. <resources/>
  25. <connections/>
  26. </ui>
To copy to clipboard, switch view to plain text mode 

I'm on windows 10 using python 3.5.1 and pyqt 4.11.4, from the latest anaconda distribution. I'm also using pyopengl 3.1.1 from this unofficial source because the offical sources don't properly install glut on windows. Was pointed to that site by several different sources so I'm pretty sure it's reliable. I'm not sure how to debug this, so any advice along that line would be much appreciated. Thanks.