[PyQt] cursor icon not changing over QSplitter

Timothy Grove tim_grove at sil.org
Mon Sep 21 11:49:07 BST 2015


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 at 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 at 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 at sil.org>
> To: PyQT mailing list <PyQt at riverbankcomputing.com>
> Subject: [PyQt] porting PyQt4 to PyQt5 on OSX - cursor icon not
> changing over QSplitter
> Message-ID:
> <CAJbHV24+sTT1iL3-B6-oiuY40CiaURh6-Rpxq+Z6smABOgALWQ at 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/20150921/78a9fdb6/attachment-0001.html>


More information about the PyQt mailing list