Re: [PyQt] ANN: PyQt v4.9.2 and SIP v4.13.3 Released

2012-06-23 Thread Kovid Goyal
I find that with PyQt 4.9.2 and SIP 4.13.2 or 4.13.3 calls to
QMainWindow::saveState freeze in *some* circumstances. Reverting to PyQt
4.9.1 fixes the issue. The freezes are happening in a closeEvent
handler (linux 64bit, Qt 4.8.2, compiled from source packages).

I haven't been able to figure out exactly when or produce a simple test
case. But I thought I should document the problem in case other people
experience it.

Kovid.

On Thu, Jun 21, 2012 at 03:21:21PM +0100, Phil Thompson wrote:
 PyQt v4.9.2 and SIP v4.13.3 have been released. From the PyQt NEWS file...
 
 - Added support for Qt v4.8.2.
 - Added support for Qt v5-alpha (QtCore and QtGui only).
 - Added support for Python v3.3.
 - bool(QPyNullVariant(...)) now returns False rather than True to mimic
   the behaviour of None.
 - Exposed the pyqtBoundSignal type object in the QtCore module.
 - Added the signal attribute to pyqtBoundSignal containing the signature
   that would be returned by SIGNAL().
 - Added the optional package argument to uic.loadUi() to properly handle
   relative imports.
 - pyuic4 now supports themed icons.
 - Added the spreadsheet example from Hans-Peter Jansen.
 
 Phil
 
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 
 !DSPAM:3,4fe32df918078536719295!
 
 

-- 
_

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_


signature.asc
Description: Digital signature
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Compiling PyQt 4.9.1 with SIP 4.13.3

2012-06-23 Thread Phil Thompson
On Fri, 22 Jun 2012 22:47:27 +, 拉佛 薩 sera-p...@hotmail.com wrote:
 Hi All,
 I'm having a trouble compiling the PyQt 4.9.1 against SIP 4.13.3.

Why not 4.9.2 (although it shouldn't make any difference to your problem)?

 I'm
 getting the following error during the compilation:
 
 PyQt-x11-gpl-4.9.1/sip/phonon/abstractaudiooutput.sip:33:33: error:
 abstractaudiooutput.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/abstractvideooutput.sip:33:33:
 error: abstractvideooutput.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/audiooutput.sip:33:25: error:
 audiooutput.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/backendcapabilities.sip:33:33:
 error: backendcapabilities.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/effect.sip:33:20: error:
effect.h:
 No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/abstractaudiooutput.sip:33:33:
 error: abstractaudiooutput.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/abstractvideooutput.sip:33:33:
 error: abstractvideooutput.h: No such file or
 directoryPyQt-x11-gpl-4.9.1/sip/phonon/audiooutput.sip:33:25: error:
 audiooutput.h: No such file or directory...
 It seems I need to install the Phonon library so I tried Phonon 4.6.0
and
 add an include path in the Makefile in the _qt folder.I managed to
 successfully compile PyQt but I'm getting the following error when
 importing the module:
 
 ImportError: PyQt4/_qt.so: undefined symbol:
 _ZNK6Phonon11VideoWidget8snapshotEv
 Any idea what I was missing?Thanks!

Phonon is part of Qt. It's difficult to say what you need to install
because you haven't said anything about your Linux(?) distribution.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Extending configure.py/siputils.py to pass CPPFLAGS

2012-06-23 Thread Phil Thompson
On Fri, 22 Jun 2012 18:45:27 -0400, Scott Kitterman deb...@kitterman.com
wrote:
 In order to support Debian's goal to have a common set of default build
 flags 
 for the distribution (with a particular focus on hardening related
 changes), I 
 need to pass CPPFLAGS through configure.
 
 I came up with the attached patch for sip4 0.13.3.  I'd appreciate a
 review.  
 It works.  I won't say much for it beyond that as I'm not sure I've
fully 
 grokked what's going on in siputils.py.  If this seams reasonable, I
 intend to 
 attack PyQt4 and QScintilla2 also.

Why? Does Debian need it to be called CPPFLAGS specifically rather than
the already supported CXXFLAGS?

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] ANN: PyQt v4.9.2 and SIP v4.13.3 Released

2012-06-23 Thread Phil Thompson
On Sat, 23 Jun 2012 12:02:36 +0530, Kovid Goyal ko...@kovidgoyal.net
wrote:
 I find that with PyQt 4.9.2 and SIP 4.13.2 or 4.13.3 calls to
 QMainWindow::saveState freeze in *some* circumstances. Reverting to PyQt
 4.9.1 fixes the issue. The freezes are happening in a closeEvent
 handler (linux 64bit, Qt 4.8.2, compiled from source packages).
 
 I haven't been able to figure out exactly when or produce a simple test
 case. But I thought I should document the problem in case other people
 experience it.

You shouldn't be able to build PyQt 4.9.2 against SIP 4.13.2.

I'd suggest trying PyQt 4.9.1 against SIP 4.13.3. That should determine if
it is a PyQt or a SIP problem.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Extending configure.py/siputils.py to pass CPPFLAGS

2012-06-23 Thread Andrew Suffield
On Sat, Jun 23, 2012 at 09:57:56AM +0100, Phil Thompson wrote:
 Why? Does Debian need it to be called CPPFLAGS specifically rather than
 the already supported CXXFLAGS?

I'm going to guess that you've made the common mistake. CPPFLAGS is
the preprocessor flags, not the C++ compiler flags. Hence invocations
would be:

gcc $(CFLAGS) $(CPPFLAGS)
g++ $(CXXFLAGS) $(CPPFLAGS)
cpp $(CPPFLAGS)
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Extending configure.py/siputils.py to pass CPPFLAGS

2012-06-23 Thread Phil Thompson
On Sat, 23 Jun 2012 10:07:02 +0100, Andrew Suffield
asuffi...@suffields.me.uk wrote:
 On Sat, Jun 23, 2012 at 09:57:56AM +0100, Phil Thompson wrote:
 Why? Does Debian need it to be called CPPFLAGS specifically rather than
 the already supported CXXFLAGS?
 
 I'm going to guess that you've made the common mistake. CPPFLAGS is
 the preprocessor flags, not the C++ compiler flags. Hence invocations
 would be:
 
 gcc $(CFLAGS) $(CPPFLAGS)
 g++ $(CXXFLAGS) $(CPPFLAGS)
 cpp $(CPPFLAGS)

Good guess :)

However the point remains that it can be achieved with existing
functionality.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Extending configure.py/siputils.py to pass CPPFLAGS

2012-06-23 Thread Scott Kitterman
On Saturday, June 23, 2012 10:15:13 AM Phil Thompson wrote:
 On Sat, 23 Jun 2012 10:07:02 +0100, Andrew Suffield
 
 asuffi...@suffields.me.uk wrote:
  On Sat, Jun 23, 2012 at 09:57:56AM +0100, Phil Thompson wrote:
  Why? Does Debian need it to be called CPPFLAGS specifically rather than
  the already supported CXXFLAGS?
  
  I'm going to guess that you've made the common mistake. CPPFLAGS is
  the preprocessor flags, not the C++ compiler flags. Hence invocations
  would be:
  
  gcc $(CFLAGS) $(CPPFLAGS)
  g++ $(CXXFLAGS) $(CPPFLAGS)
  cpp $(CPPFLAGS)
 
 Good guess :)
 
 However the point remains that it can be achieved with existing
 functionality.

It can.  I thought it would be more correct to extend configure, but if you'd 
rather not I can just CXXFLAGS=${CXXFLAGS} ${CPPFLAGS}.  That's why I sent 
you the patch for review before applying it to Debian.

Scott K
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Issue building PyQt4 4.9.2 on Mac OS X Lion

2012-06-23 Thread Detlev Offenbach
Hello,

I tried to build latest PyQt4 on Mac OS X Lion without success. The command

python3 configure.py --verbose 

gives this output.

Determining the layout of your Qt installation...
/usr/bin/qmake -spec default -o qtdirs.mk qtdirs.pro
Error: /usr/bin/qmake failed to create a makefile. Make sure you have a working
Qt v4 qmake on your PATH or use the -q argument to explicitly specify a working
Qt v4 qmake.


The same command works fine for PyQt4 4.9.1.

Any help is appreciated.

Regards,
Detlev

Detlev Offenbach
det...@die-offenbachs.de



___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Issue building PyQt4 4.9.2 on Mac OS X Lion

2012-06-23 Thread Santiago Reig
 I tried to build latest PyQt4 on Mac OS X Lion without success. The command

 python3 configure.py --verbose

 gives this output.

 Determining the layout of your Qt installation...
 /usr/bin/qmake -spec default -o qtdirs.mk qtdirs.pro
 Error: /usr/bin/qmake failed to create a makefile. Make sure you have a 
 working
 Qt v4 qmake on your PATH or use the -q argument to explicitly specify a 
 working
 Qt v4 qmake.

I was struggling all morning to get this fixed, but got that error
whatever I did. I was just recompiling my project again to get the
error and post it here.

I can confirm that it also happens with python 2.7.1 and 2.7.2, also
under Mac OS X Lion.

Regards

Santiago Reig
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Issue building PyQt4 4.9.2 on Mac OS X Lion

2012-06-23 Thread Phil Thompson
On Sat, 23 Jun 2012 17:06:30 +0200, Santiago Reig santir...@gmail.com
wrote:
 I tried to build latest PyQt4 on Mac OS X Lion without success. The
 command

 python3 configure.py --verbose

 gives this output.

 Determining the layout of your Qt installation...
 /usr/bin/qmake -spec default -o qtdirs.mk qtdirs.pro
 Error: /usr/bin/qmake failed to create a makefile. Make sure you have a
 working
 Qt v4 qmake on your PATH or use the -q argument to explicitly specify a
 working
 Qt v4 qmake.
 
 I was struggling all morning to get this fixed, but got that error
 whatever I did. I was just recompiling my project again to get the
 error and post it here.
 
 I can confirm that it also happens with python 2.7.1 and 2.7.2, also
 under Mac OS X Lion.

Edit the initialisation of qt_macx_spec in configure.py and change it from
'default' to 'macx-g++'.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Issue building PyQt4 4.9.2 on Mac OS X Lion

2012-06-23 Thread Santiago Reig
 Edit the initialisation of qt_macx_spec in configure.py and change it from
 'default' to 'macx-g++'.

That seems to have fixed it.

Regards.

Santiago Reig
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Combo box very slow for Thai language data.

2012-06-23 Thread Sukit Taweesap
Hi

Sorry if I use wrong English.
I found that the combo box with drop down list will be very slow when click the 
combo box, the drop down list need a few second to show if the data on the list 
was Thai language. But the English data was no problem. 

This problem occur after PyQt version 4.8.6.

I use 64 bits windows 7, python 3.2.3, eric5 5.2.3 with database mysql 5. 

Regards,
Sukit Taweesap.___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] ANN: PyQt v4.9.2 and SIP v4.13.3 Released

2012-06-23 Thread Kovid Goyal
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('bodyhello/body')

def closeEvent(self, e):
print (111, bytearray(self.saveState(1)))
e.accept()

m = MW()
m.show()
app.exec_()



signature.asc
Description: Digital signature
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] ANN: PyQt v4.9.2 and SIP v4.13.3 Released

2012-06-23 Thread Kovid Goyal
Just for completeness, here is the simplest possible test case:

python -c from PyQt4.Qt import QByteArray; bytearray(QByteArray(b''))

This causes a hang with PyQt 4.8.2 but not with PyQt 4.8.1 (sip 4.13.3)

Kovid.

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?
 
 Phil
 
 !DSPAM:3,4fe6347418077280658049!
 
 

-- 
_

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_


signature.asc
Description: Digital signature
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt