[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] cursor icon not	changing	over QSplitter
From:       "Rembrand (daxLAB Limitted)" <rembrand () daxlab ! com>
Date:       2015-09-20 9:21:14
Message-ID: kdjvymf1tsd066w5x6u5cwgw.1442740874245 () email ! android ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]


    
If it was the GIL then your app would not respond at all if clicking on  or hovering  \
over a button for example.  I have not come across this issue and  have more or less \
the same setup (using VLC python bindings) with the difference I use Qt5.5 with \
python 2.7 on Mac OS Yoshmite.  I can resize my tab widgets using a vertical splitter \
while playing a movie.  HOWEVER I did on Fedora 20 KDE Linux come across such an \
issue (among others) when using QtMultimedia combined with QWebEngine in the same \
app...... which was for me the reason to stay with VLC python bindings. 

Best regards,Rembrand
Cell phone: +31 646.224.526Email: rembrand@daxlab.comSent from my smart phone.


-------- Original message --------
From: pyqt-request@riverbankcomputing.com 
Date: 19/09/2015  13:00  (GMT+01:00) 
To: pyqt@riverbankcomputing.com 
Subject: PyQt Digest, Vol 134, Issue 23 

Send PyQt mailing list submissions to
	pyqt@riverbankcomputing.com

To subscribe or unsubscribe via the World Wide Web, visit
	https://www.riverbankcomputing.com/mailman/listinfo/pyqt
or, via email, send a message with subject or body 'help' to
	pyqt-request@riverbankcomputing.com

You can reach the person managing the list at
	pyqt-owner@riverbankcomputing.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of PyQt digest..."


Today's Topics:

   1. segfault creating an empty QGraphicsScene (Russell Warren)
   2. Re: Implementation of the QQuickFramebufferObject (Phil Thompson)
   3. porting PyQt4 to PyQt5 on OSX - cursor icon not changing	over
      QSplitter (Timothy Grove)
   4. Bug in qpycore_PyObject_AsQString (Kovid Goyal)


----------------------------------------------------------------------

Message: 1
Date: Fri, 18 Sep 2015 10:49:13 -0400
From: Russell Warren <russ@perspexis.com>
To: pyqt <pyqt@riverbankcomputing.com>
Subject: [PyQt] segfault creating an empty QGraphicsScene
Message-ID:
	<CAD91c15k4-rOgwDN--h+MNc2_qXXNWnKbshw2js45W+DKjzyWg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I'm creating a QGraphicsScene with the intent to render to a
QQuickPaintedItem and I'm having segfault issues.

I've stripped the problem down to a very small script pair and attached
them.  Note that the QGraphicsScene.render() call is not even present since
it didn't have anything to do with the segfault.

The segfault happens on the creation of the QGraphicsScene.  Remove the
line and the (bogus) application works.

fwiw, even when you remove the line and it works, this program segfaults on
me when I close the window.  I don't know why.  Also fwiw, at some point I
did have similar code working and the QGraphicsScene was rendering properly
to the QQuickPaintedItem.  I'm not sure what the difference is.

My environment is Qt5.5.0 and PyQt 5.5,  Running on Debian 7.8 (wheezy)
64-bit.  This was also happening to me on Qt 5.4.1 and I upgraded in hopes
of the problem disappearing.  It has also been confirmed to fail on Windows.

Am I doing something wrong that is causing the segfaults, or is this a
Qt/PyQt bug?

Thanks,
Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.html>
                
-------------- next part --------------
A non-text attachment was scrubbed...
Name: segfault.py
Type: text/x-python
Size: 1190 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.py>
                
-------------- next part --------------
A non-text attachment was scrubbed...
Name: segfault.qml
Type: text/x-qml
Size: 128 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.bin>


------------------------------

Message: 2
Date: Fri, 18 Sep 2015 18:03:12 +0100
From: Phil Thompson <phil@riverbankcomputing.com>
To: Rostyslav Lyulinetskyy <info@rostik.de>
Cc: pyqt@riverbankcomputing.com
Subject: Re: [PyQt] Implementation of the QQuickFramebufferObject
Message-ID:
	<B709A6AE-5A13-4523-8F0F-14C8BA518AFD@riverbankcomputing.com>
Content-Type: text/plain; charset=us-ascii

On 15 Sep 2015, at 12:14 pm, Rostyslav Lyulinetskyy <info@rostik.de> wrote:
> 
> Hi,
> 
> I am trying to port my c++ code to python and I am integrating a custom OpenGL \
> rendering with Qt Quick via QQuickFramebufferObject (as described here: \
> https://blog.qt.io/blog/2015/05/11/integrating-custom-opengl-rendering-with-qt-quick-via-qquickframebufferobject/)
>  Everything works well in c++, but for various reasons I need to port this to \
> python and it doesn't seem to work. The virtual function createRenderer() in the \
> QQuickFramebufferObject must be overridden so one can return a new renderer, but \
> for some reason this function is not even called when using PyQt. 
> Is it even possible to override this virtual function from python? Am I missing \
> something? 
> Here is a small example to replicate that the createRenderer() function is not \
> called: https://gist.github.com/rostikL/7876e4c47fc8dd8ce02f

Tonight's snapshot will make sure createRenderer() is called. However there may well \
be issues with the ownership of the returned renderer. Please test and let me know.

Phil

------------------------------

Message: 3
Date: Sat, 19 Sep 2015 09:23:16 +0100
From: Timothy Grove <tim_grove@sil.org>
To: PyQT mailing list <PyQt@riverbankcomputing.com>
Subject: [PyQt] porting PyQt4 to PyQt5 on OSX - cursor icon not
	changing	over QSplitter
Message-ID:
	<CAJbHV24+sTT1iL3-B6-oiuY40CiaURh6-Rpxq+Z6smABOgALWQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I'm porting an application from PyQt4 to PyQt5 on Mac OSX (Mavericks).
Generally a good experience, but I'm seeing a few strange behaviours that I
haven't been able to work around; possibly due to accessing the window id
of the widget in my video player, or possibly a GIL release issue?

*1. The cursor doesn't change when moved over a splitter handle. *This
"might" be related to a "closed' issue where a widget's window id was
accessed with the widget in a QSplitter [
https://bugreports.qt.io/browse/QTBUG-33479], but might it also be related
to not releasing the GIL? I'm using the python bindings for VLC [
https://wiki.videolan.org/Python_bindings] which uses the window id to make
the link between VLC and a widget for video display; in my case, a QLabel.
I've also tried replacing VLC use with QVideoWidget from
PyQt5.QtMultimediaWidgets, but with similar results. Before a video is
loaded I can see the expected change in cursor icon over the splitter
handle, but once a video has loaded - no change.

Using Macports Mavericks (10.9.5):
python3.4 @3.4.3_5
qt5-mac @5.4.2_1
py34-sip @4.16.9_0
py34-pyqt5 @5.5_0

Best regards,
Timothy Grove
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150919/3a6f7f0e/attachment-0001.html>


------------------------------

Message: 4
Date: Sat, 19 Sep 2015 14:06:02 +0530
From: Kovid Goyal <kovid@kovidgoyal.net>
To: pyqt@riverbankcomputing.com
Subject: [PyQt] Bug in qpycore_PyObject_AsQString
Message-ID: <20150919083602.GL918@qedette>
Content-Type: text/plain; charset=us-ascii

I saw the following assert in one of my programs:

python3: ../qpy/QtCore/qpycore_qstring.cpp:165: QString \
qpycore_PyObject_AsQString(PyObject*): Assertion \
`(((PyASCIIObject*)obj)->state.ready)' failed.

This will happen if a python string that is not "ready" is passed into a
PyQt API (such strings can be created by C python extensions, notably
sqlite). That function should call PyUnicode_READY (and check its return
value). 

As a workaround, one can call str() on the string before passing it to
PyQt.

Kovid.

-- 
_____________________________________

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


------------------------------

Subject: Digest Footer

_______________________________________________
PyQt mailing list
PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

------------------------------

End of PyQt Digest, Vol 134, Issue 23
*************************************


[Attachment #5 (text/html)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=UTF-8"></head><body>  
<div>If it was the GIL then your app would not respond at all if clicking on &nbsp;or \
hovering &nbsp;over a button for example. &nbsp;I have not come across this issue and \
&nbsp;have more or less the same setup (using VLC python bindings) with the \
difference I use Qt5.5 with python 2.7 on Mac OS \
Yoshmite.&nbsp;</div><div><br></div><div>I can resize my tab widgets using a vertical \
splitter while playing a movie. &nbsp;HOWEVER I did on Fedora 20 KDE Linux come \
across such an issue (among others) when using QtMultimedia combined with QWebEngine \
in the same app...... which was for me the reason to stay with VLC python \
bindings.&nbsp;</div><div><br></div><div><br></div><div id="composer_signature"><div \
style="font-size:9px">Best regards,</div><div \
style="font-size:9px">Rembrand</div><div style="font-size:9px"><br></div><div \
style="font-size:9px">Cell phone: +31 646.224.526</div><div \
style="font-size:9px">Email: rembrand@daxlab.com</div><div style="font-size:9px">Sent \
from my smart phone.</div><div \
style="font-size:9px"><br></div><div></div></div><br><br>-------- Original message \
--------<br>From: pyqt-request@riverbankcomputing.com <br>Date: 19/09/2015  13:00  \
(GMT+01:00) <br>To: pyqt@riverbankcomputing.com <br>Subject: PyQt Digest, Vol 134, \
Issue 23 <br><br>Send PyQt mailing list submissions \
to<br>	pyqt@riverbankcomputing.com<br><br>To subscribe or unsubscribe via the World \
Wide Web, visit<br>	https://www.riverbankcomputing.com/mailman/listinfo/pyqt<br>or, \
via email, send a message with subject or body 'help' \
to<br>	pyqt-request@riverbankcomputing.com<br><br>You can reach the person managing \
the list at<br>	pyqt-owner@riverbankcomputing.com<br><br>When replying, please edit \
your Subject line so it is more specific<br>than "Re: Contents of PyQt \
digest..."<br><br><br>Today's Topics:<br><br>&nbsp;&nbsp; 1. segfault creating an \
empty QGraphicsScene (Russell Warren)<br>&nbsp;&nbsp; 2. Re: Implementation of the \
QQuickFramebufferObject (Phil Thompson)<br>&nbsp;&nbsp; 3. porting PyQt4 to PyQt5 on \
OSX - cursor icon not changing	over<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QSplitter \
(Timothy Grove)<br>&nbsp;&nbsp; 4. Bug in qpycore_PyObject_AsQString (Kovid \
Goyal)<br><br><br>----------------------------------------------------------------------<br><br>Message: \
1<br>Date: Fri, 18 Sep 2015 10:49:13 -0400<br>From: Russell Warren \
&lt;russ@perspexis.com&gt;<br>To: pyqt \
&lt;pyqt@riverbankcomputing.com&gt;<br>Subject: [PyQt] segfault creating an empty \
QGraphicsScene<br>Message-ID:<br>	&lt;CAD91c15k4-rOgwDN--h+MNc2_qXXNWnKbshw2js45W+DKjzyWg@mail.gmail.com&gt;<br>Content-Type: \
text/plain; charset="utf-8"<br><br>I'm creating a QGraphicsScene with the intent to \
render to a<br>QQuickPaintedItem and I'm having segfault issues.<br><br>I've stripped \
the problem down to a very small script pair and attached<br>them.&nbsp; Note that \
the QGraphicsScene.render() call is not even present since<br>it didn't have anything \
to do with the segfault.<br><br>The segfault happens on the creation of the \
QGraphicsScene.&nbsp; Remove the<br>line and the (bogus) application \
works.<br><br>fwiw, even when you remove the line and it works, this program \
segfaults on<br>me when I close the window.&nbsp; I don't know why.&nbsp; Also fwiw, \
at some point I<br>did have similar code working and the QGraphicsScene was rendering \
properly<br>to the QQuickPaintedItem.&nbsp; I'm not sure what the difference \
is.<br><br>My environment is Qt5.5.0 and PyQt 5.5,&nbsp; Running on Debian 7.8 \
(wheezy)<br>64-bit.&nbsp; This was also happening to me on Qt 5.4.1 and I upgraded in \
hopes<br>of the problem disappearing.&nbsp; It has also been confirmed to fail on \
Windows.<br><br>Am I doing something wrong that is causing the segfaults, or is this \
a<br>Qt/PyQt bug?<br><br>Thanks,<br>Russ<br>-------------- next part \
--------------<br>An HTML attachment was scrubbed...<br>URL: \
&lt;https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.html&gt;<br>-------------- \
next part --------------<br>A non-text attachment was scrubbed...<br>Name: \
segfault.py<br>Type: text/x-python<br>Size: 1190 bytes<br>Desc: not available<br>URL: \
&lt;https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.py&gt;<br>-------------- \
next part --------------<br>A non-text attachment was scrubbed...<br>Name: \
segfault.qml<br>Type: text/x-qml<br>Size: 128 bytes<br>Desc: not available<br>URL: \
&lt;https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150918/7e0783c3/attachment-0001.bin&gt;<br><br>------------------------------<br><br>Message: \
2<br>Date: Fri, 18 Sep 2015 18:03:12 +0100<br>From: Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;<br>To: Rostyslav Lyulinetskyy \
&lt;info@rostik.de&gt;<br>Cc: pyqt@riverbankcomputing.com<br>Subject: Re: [PyQt] \
Implementation of the \
QQuickFramebufferObject<br>Message-ID:<br>	&lt;B709A6AE-5A13-4523-8F0F-14C8BA518AFD@riverbankcomputing.com&gt;<br>Content-Type: \
text/plain; charset=us-ascii<br><br>On 15 Sep 2015, at 12:14 pm, Rostyslav \
Lyulinetskyy &lt;info@rostik.de&gt; wrote:<br>&gt; <br>&gt; Hi,<br>&gt; <br>&gt; I am \
trying to port my c++ code to python and I am integrating a custom OpenGL rendering \
with Qt Quick via QQuickFramebufferObject (as described here: \
https://blog.qt.io/blog/2015/05/11/integrating-custom-opengl-rendering-with-qt-quick-via-qquickframebufferobject/)<br>&gt; \
Everything works well in c++, but for various reasons I need to port this to python \
and it doesn't seem to work. The virtual function createRenderer() in the \
QQuickFramebufferObject must be overridden so one can return a new renderer, but for \
some reason this function is not even called when using PyQt.<br>&gt; <br>&gt; Is it \
even possible to override this virtual function from python? Am I missing \
something?<br>&gt; <br>&gt; Here is a small example to replicate that the \
createRenderer() function is not called:<br>&gt; \
https://gist.github.com/rostikL/7876e4c47fc8dd8ce02f<br><br>Tonight's snapshot will \
make sure createRenderer() is called. However there may well be issues with the \
ownership of the returned renderer. Please test and let me \
know.<br><br>Phil<br><br>------------------------------<br><br>Message: 3<br>Date: \
Sat, 19 Sep 2015 09:23:16 +0100<br>From: Timothy Grove \
&lt;tim_grove@sil.org&gt;<br>To: PyQT mailing list \
&lt;PyQt@riverbankcomputing.com&gt;<br>Subject: [PyQt] porting PyQt4 to PyQt5 on OSX \
- cursor icon not<br>	changing	over \
QSplitter<br>Message-ID:<br>	&lt;CAJbHV24+sTT1iL3-B6-oiuY40CiaURh6-Rpxq+Z6smABOgALWQ@mail.gmail.com&gt;<br>Content-Type: \
text/plain; charset="utf-8"<br><br>I'm porting an application from PyQt4 to PyQt5 on \
Mac OSX (Mavericks).<br>Generally a good experience, but I'm seeing a few strange \
behaviours that I<br>haven't been able to work around; possibly due to accessing the \
window id<br>of the widget in my video player, or possibly a GIL release \
issue?<br><br>*1. The cursor doesn't change when moved over a splitter handle. \
*This<br>"might" be related to a "closed' issue where a widget's window id \
was<br>accessed with the widget in a QSplitter \
[<br>https://bugreports.qt.io/browse/QTBUG-33479], but might it also be related<br>to \
not releasing the GIL? I'm using the python bindings for VLC \
[<br>https://wiki.videolan.org/Python_bindings] which uses the window id to \
make<br>the link between VLC and a widget for video display; in my case, a \
QLabel.<br>I've also tried replacing VLC use with QVideoWidget \
from<br>PyQt5.QtMultimediaWidgets, but with similar results. Before a video \
is<br>loaded I can see the expected change in cursor icon over the \
splitter<br>handle, but once a video has loaded - no change.<br><br>Using Macports \
Mavericks (10.9.5):<br>python3.4 @3.4.3_5<br>qt5-mac @5.4.2_1<br>py34-sip \
@4.16.9_0<br>py34-pyqt5 @5.5_0<br><br>Best regards,<br>Timothy \
Grove<br>-------------- next part --------------<br>An HTML attachment was \
scrubbed...<br>URL: &lt;https://www.riverbankcomputing.com/pipermail/pyqt/attachments/ \
20150919/3a6f7f0e/attachment-0001.html&gt;<br><br>------------------------------<br><br>Message: \
4<br>Date: Sat, 19 Sep 2015 14:06:02 +0530<br>From: Kovid Goyal \
&lt;kovid@kovidgoyal.net&gt;<br>To: pyqt@riverbankcomputing.com<br>Subject: [PyQt] \
Bug in qpycore_PyObject_AsQString<br>Message-ID: \
&lt;20150919083602.GL918@qedette&gt;<br>Content-Type: text/plain; \
charset=us-ascii<br><br>I saw the following assert in one of my \
programs:<br><br>python3: ../qpy/QtCore/qpycore_qstring.cpp:165: QString \
qpycore_PyObject_AsQString(PyObject*): Assertion \
`(((PyASCIIObject*)obj)-&gt;state.ready)' failed.<br><br>This will happen if a python \
string that is not "ready" is passed into a<br>PyQt API (such strings can be created \
by C python extensions, notably<br>sqlite). That function should call PyUnicode_READY \
(and check its return<br>value). <br><br>As a workaround, one can call str() on the \
string before passing it to<br>PyQt.<br><br>Kovid.<br><br>-- \
<br>_____________________________________<br><br>Dr. Kovid Goyal \
<br>http://www.kovidgoyal.net<br>http://calibre-ebook.com<br>_____________________________________<br><br><br>------------------------------<br><br>Subject: \
Digest Footer<br><br>_______________________________________________<br>PyQt mailing \
list<br>PyQt@riverbankcomputing.com<br>https://www.riverbankcomputing.com/mailman/listinfo/pyqt<br><br>------------------------------<br><br>End \
of PyQt Digest, Vol 134, Issue \
23<br>*************************************<br></br></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic