Python 2.7.4x32, Qt 4.8.4 (4.10.2-py27)x32 on Windows 7 64-bit OS PC's (multiple machines)<br><br>I'm having a reproducible APPCRASH (in QtGUI4.dll) on exit of any application I write that uses a QMainWindow and a menuBar, if the window contains > 10 other widgets.<br>
If I remove widgets down below the threshold (10), app closes normally.<br>Whether I write it by hand or in QTDesigner, but if I include a menubar, blank or otherwise, App does not close properly in Windows resulting in a 'close program' Windows dialog.<br>
<br>This happens on all 3 of my Windows 7 boxes here, but works fine in a instance of Windows XP on an older machine. (Same PyQt/Python versions)<br><br>An example with code would be I create a QMainWindow in QT Designer, put 12 widgets of any combination on it. (In this example I added a menu bar in my code, but works the same (crash) if I add it in QTDesigner.<br>
<br><br>import sys<br>from PyQt4 import QtGui<br>import ui_mainwindow as UIMW<br><br>class MainWindow(QtGui.QMainWindow, UIMW.Ui_MainWindow):<br><br> def __init__(self):<br> super(MainWindow, self).__init__()<br>
self.setupUi(self)<br><br> # MenuBar testing<br> self.menubar = self.menuBar()<br> menu = self.menubar.addMenu("Test")<br><br>app = QtGui.QApplication(sys.argv)<br>window = MainWindow()<br>
window.show()<br>sys.exit(app.exec_())<br><br>As long as my Ui_MainWindow has > 10 widgets + menuBar, I get:<br> Problem Event Name: APPCRASH<br> Application Name: python.exe<br> Application Version: 0.0.0.0<br>
Application Timestamp: 51606175<br> Fault Module Name: QtGui4.dll<br> Fault Module Version: 4.8.4.0<br><br>About 10% of the time, the first time I run the app, it will not crash until I run it again, click on some widgets, etc, and then exit.<br>
<br><br>