On Sat, Jun 23, 2012 at 10:26:08PM +0100, Phil Thompson wrote: > On Sat, 23 Jun 2012 21:53:48 +0530, Kovid Goyal <ko...@kovidgoyal.net> > wrote: > > On Sat, Jun 23, 2012 at 01:36:42PM +0100, Phil Thompson wrote: > >> Hmm, hardly anything has changed in PyQt4. Can you try using the... > >> > >> qpy/QtCore/qpycore_pyqtproxy.cpp > >> > >> ...from 4.9.1 in 4.9.2? > > > > Still hangs. > > I'm struggling to think what might have changed. Do you know the line at > which it hangs? Does it look like a deadlock?
This line: http://bazaar.launchpad.net/~kovid/calibre/trunk/view/head:/src/calibre/gui2/viewer/main.py#L367 I figured out the problem. It is a conversion from QByteArray to bytearray. The following code causes a hang: bytearray(self.saveState(1)) This does not: self.saveState(1) Attached test case. Kovid. -- _____________________________________ Dr. Kovid Goyal http://www.kovidgoyal.net http://calibre-ebook.com _____________________________________
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt4.Qt import (QMainWindow, QSplitter, QApplication, QLabel, QWebView) app = QApplication([]) app class MW(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.s = s = QSplitter() self.setCentralWidget(s) self.addToolBar('test').setObjectName('one') self.addToolBar('test2').setObjectName('two') s.addWidget(QLabel('one')) s.addWidget(QLabel('two')) self.s2 = s2 = QSplitter() s.addWidget(s2) self.v = v = QWebView() s2.addWidget(v) v.page().mainFrame().setHtml('<body>hello</body>') def closeEvent(self, e): print (1111111, bytearray(self.saveState(1))) e.accept() m = MW() m.show() app.exec_()
signature.asc
Description: Digital signature
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt