[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] cursor icon not changing over QSplitter
From: Timothy Grove <tim_grove () sil ! org>
Date: 2015-09-21 10:49:07
Message-ID: CAJbHV240a+_m+82APXwY-fJDgNn5aY8qkvW6hZgY9B7FCu_OZw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Most definitely related to bug https://bugreports.qt.io/browse/QTBUG-33479.
The status says the issue was closed and fixed in Qt 5.3.0 RC1, but I guess
it has reappeared. Sample (Python) code below.
from PyQt5.QtWidgets import *
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
mainWindow = QMainWindow()
splitter = QSplitter()
widget1 = QWidget()
widget1.setStyleSheet('background-color: Blue')
widget2 = QWidget()
widget2.setStyleSheet('background-color: Black')
# removing the next line will fix the issue!
winId = widget1.winId()
splitter.addWidget(widget1)
splitter.addWidget(widget2)
mainWindow.setCentralWidget(splitter)
mainWindow.show()
app.exec()
# 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
On Sun, Sep 20, 2015 at 10:21 AM, Rembrand (daxLAB Limitted) <
rembrand@daxlab.com> wrote:
> 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.526
> Email: rembrand@daxlab.com
> Sent from my smart phone.
>
> 3. porting PyQt4 to PyQt5 on OSX - cursor icon not changing over
> QSplitter (Timothy Grove)
> ------------------------------
>
> 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
>
[Attachment #5 (text/html)]
<div dir="ltr">Most definitely related to bug <a \
href="https://bugreports.qt.io/browse/QTBUG-33479">https://bugreports.qt.io/browse/QTBUG-33479</a>. \
The status says the issue was closed and fixed in Qt 5.3.0 RC1, but I guess it has \
reappeared. Sample (Python) code below.<div><br></div><div><p \
style="margin:0px;font-size:14px;font-family:Monaco"><span \
style="color:rgb(4,51,255)">from</span> <span \
style="text-decoration:underline">PyQt5.QtWidgets </span><span \
style="text-decoration:underline;color:rgb(4,51,255)">import</span><span \
style="text-decoration:underline"> *</span></p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"><br></p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"><span \
style="color:rgb(4,51,255)">if</span> __name__ == <span \
style="color:rgb(0,180,0)">'__main__'</span>:</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> <span \
style="color:rgb(4,51,255)">import</span> sys </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> app = \
QApplication(sys.argv)</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> mainWindow = QMainWindow() \
</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> splitter = \
QSplitter()</p> <p style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> \
</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> widget1 = \
QWidget()</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> \
widget1.setStyleSheet(<span style="color:rgb(0,180,0)">'background-color: \
Blue'</span>)</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> \
widget2 = QWidget()</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> \
widget2.setStyleSheet(<span style="color:rgb(0,180,0)">'background-color: \
Black'</span>)</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"><span \
style="color:rgb(0,0,0)"> </span># removing the next line will fix the \
issue!</p> <p style="margin:0px;font-size:14px;font-family:Monaco"> winId = \
widget1.winId()</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> \
splitter.addWidget(widget1)</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> \
splitter.addWidget(widget2)</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> \
mainWindow.setCentralWidget(splitter)</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> mainWindow.show()</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco"> app.<span \
style="color:rgb(4,51,255)">exec</span>()</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;min-height:19px"> </p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"># \
Using <span style="text-decoration:underline">Macports</span> <span \
style="text-decoration:underline">Mavericks</span> (10.9.5):</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"># \
python3.4 @3.4.3_5</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"># \
qt5-<span style="text-decoration:underline">mac</span> @5.4.2_1</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"># \
py34-sip @4.16.9_0</p> <p \
style="margin:0px;font-size:14px;font-family:Monaco;color:rgb(203,203,203)"># \
py34-pyqt5 @5.5_0</p></div><div class="gmail_extra"><br><div class="gmail_quote">On \
Sun, Sep 20, 2015 at 10:21 AM, Rembrand (daxLAB Limitted) <span dir="ltr"><<a \
href="mailto:rembrand@daxlab.com" target="_blank">rembrand@daxlab.com</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div>
<div>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. </div><div><br></div><div>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. </div><div><br></div><div><br></div><div><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: <a href="mailto:rembrand@daxlab.com" \
target="_blank">rembrand@daxlab.com</a></div><div style="font-size:9px">Sent from my \
smart phone.</div></div></div></blockquote><div> </div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div> 3. porting PyQt4 to PyQt5 on OSX - cursor icon not \
changing over<br> QSplitter (Timothy \
Grove)<br>------------------------------<br><br>Message: 3<br>Date: Sat, 19 Sep 2015 \
09:23:16 +0100<br>From: Timothy Grove <<a href="mailto:tim_grove@sil.org" \
target="_blank">tim_grove@sil.org</a>><br>To: PyQT mailing list <<a \
href="mailto:PyQt@riverbankcomputing.com" \
target="_blank">PyQt@riverbankcomputing.com</a>><br>Subject: [PyQt] porting PyQt4 \
to PyQt5 on OSX - cursor icon not<br> changing over \
QSplitter<br>Message-ID:<br> <<a \
href="mailto:CAJbHV24%2BsTT1iL3-B6-oiuY40CiaURh6-Rpxq%2BZ6smABOgALWQ@mail.gmail.com" \
target="_blank">CAJbHV24+sTT1iL3-B6-oiuY40CiaURh6-Rpxq+Z6smABOgALWQ@mail.gmail.com</a>><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><a href="https://bugreports.qt.io/browse/QTBUG-33479" \
target="_blank">https://bugreports.qt.io/browse/QTBUG-33479</a>], but might it also \
be related<br>to not releasing the GIL? I'm using the python bindings for VLC \
[<br><a href="https://wiki.videolan.org/Python_bindings" \
target="_blank">https://wiki.videolan.org/Python_bindings</a>] 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</div></blockquote></div></div></div>
[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