Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

David Morris

I am developing a small media player application using PyQt5 on MacOS Mojave. Any time the mouse is hovering over a widget where the mouse pointer changes shape, the mouse pointer begins to blink (flash?), changing shape between the normal mouse pointer and the alternate mouse pointer.

For example, if I create a QLineEdit widget the mouse pointer changes to an I-Beam as the alternate pointer when hovering over the widget. Ordinarily this the mouse pointer simply changes shape so long as I am hovering over the widget. However, in the below test application the mouse pointer continually changes shape between the I-Beam pointer and the normal arrow mouse pointer, changing back and forth at the same rate as the input position cursor in the widget.

Example code showing this behavior on my system:

import sys
from PyQt5               import QtWidgets
from PyQt5               import QtCore


class MainWindow(QtWidgets.QMainWindow):
    sig = QtCore.pyqtSignal()
    def __init__(self):
        super().__init__()
        self.resize(400,400)
        self.cw = QtWidgets.QWidget(self)
        self.setCentralWidget(self.cw)
        self.l = QtWidgets.QVBoxLayout(self.cw)
        self.le = QtWidgets.QLineEdit(self.cw)
        self.l.addWidget(self.le)
        self.label = QtWidgets.QLabel()
        self.l.addWidget(self.label)
        self.show()

app=QtWidgets.QApplication([sys.argv])
w=MainWindow()
app.setActiveWindow(w)
exit_code = app.exec_()

sys.exit(exit_code)

In the above code I can fix the problem by disabling the line edit cursor flash using app.setCursorFlashTime(0). However, this does NOT fix the problem in my application. In my application, signals in other widgets will also cause the same mouse pointer shape changing (blinking) behavior.

Version details:
MacOS Mojave 10.14.1
PyQt5 5.12.2
Python 3.7.3

I have developed QtApplications in the past and never observed this behavior and am at a loss as to why this is happening.

It occurred to me this could be a MacOS bug, but I am unable to update my system at the moment (I am on a very poor internet connection and the update is huge).

Does anyone have a solution for this highly irritating behavior?

EDIT: Change "mouse cursor" to "mouse pointer" for clarity.


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

David Morris
Updates (but no fix):

I updated my mac to MacOS 10.14.5 and the problem persists.
I tried some examples from PyQt5 and all exhibit the same behavior.

However, Designer does NOT exhibit this behavior, and I understand it is written in Qt.  Is this a PyQt5 bug on MacOS?

FYI, I installed PyQt5 using:  pip install pyqt5

Can anyone on MacOS Mojave replicate this with my example code?  

David

On Tue, May 14, 2019 at 4:22 PM David Morris <[hidden email]> wrote:

I am developing a small media player application using PyQt5 on MacOS Mojave. Any time the mouse is hovering over a widget where the mouse pointer changes shape, the mouse pointer begins to blink (flash?), changing shape between the normal mouse pointer and the alternate mouse pointer.

For example, if I create a QLineEdit widget the mouse pointer changes to an I-Beam as the alternate pointer when hovering over the widget. Ordinarily this the mouse pointer simply changes shape so long as I am hovering over the widget. However, in the below test application the mouse pointer continually changes shape between the I-Beam pointer and the normal arrow mouse pointer, changing back and forth at the same rate as the input position cursor in the widget.

Example code showing this behavior on my system:

import sys
from PyQt5               import QtWidgets
from PyQt5               import QtCore


class MainWindow(QtWidgets.QMainWindow):
    sig = QtCore.pyqtSignal()
    def __init__(self):
        super().__init__()
        self.resize(400,400)
        self.cw = QtWidgets.QWidget(self)
        self.setCentralWidget(self.cw)
        self.l = QtWidgets.QVBoxLayout(self.cw)
        self.le = QtWidgets.QLineEdit(self.cw)
        self.l.addWidget(self.le)
        self.label = QtWidgets.QLabel()
        self.l.addWidget(self.label)
        self.show()

app=QtWidgets.QApplication([sys.argv])
w=MainWindow()
app.setActiveWindow(w)
exit_code = app.exec_()

sys.exit(exit_code)

In the above code I can fix the problem by disabling the line edit cursor flash using app.setCursorFlashTime(0). However, this does NOT fix the problem in my application. In my application, signals in other widgets will also cause the same mouse pointer shape changing (blinking) behavior.

Version details:
MacOS Mojave 10.14.1
PyQt5 5.12.2
Python 3.7.3

I have developed QtApplications in the past and never observed this behavior and am at a loss as to why this is happening.

It occurred to me this could be a MacOS bug, but I am unable to update my system at the moment (I am on a very poor internet connection and the update is huge).

Does anyone have a solution for this highly irritating behavior?

EDIT: Change "mouse cursor" to "mouse pointer" for clarity.


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

Phil Thompson-5
No, works fine for me.

Phil

On 14/05/2019 20:39, David Morris wrote:

> Updates (but no fix):
>
> I updated my mac to MacOS 10.14.5 and the problem persists.
> I tried some examples from PyQt5 and all exhibit the same behavior.
>
> However, Designer does NOT exhibit this behavior, and I understand it
> is
> written in Qt.  Is this a PyQt5 bug on MacOS?
>
> FYI, I installed PyQt5 using:  pip install pyqt5
>
> Can anyone on MacOS Mojave replicate this with my example code?
>
> David
>
> On Tue, May 14, 2019 at 4:22 PM David Morris <[hidden email]>
> wrote:
>
>> I am developing a small media player application using PyQt5 on MacOS
>> Mojave. Any time the mouse is hovering over a widget where the mouse
>> pointer changes shape, the mouse pointer begins to blink (flash?),
>> changing
>> shape between the normal mouse pointer and the alternate mouse
>> pointer.
>>
>> For example, if I create a QLineEdit widget the mouse pointer changes
>> to
>> an I-Beam as the alternate pointer when hovering over the widget.
>> Ordinarily this the mouse pointer simply changes shape so long as I am
>> hovering over the widget. However, in the below test application the
>> mouse
>> pointer continually changes shape between the I-Beam pointer and the
>> normal
>> arrow mouse pointer, changing back and forth at the same rate as the
>> input
>> position cursor in the widget.
>>
>> Example code showing this behavior on my system:
>>
>> import sysfrom PyQt5               import QtWidgetsfrom PyQt5          
>>      import QtCore
>>
>> class MainWindow(QtWidgets.QMainWindow):
>>     sig = QtCore.pyqtSignal()
>>     def __init__(self):
>>         super().__init__()
>>         self.resize(400,400)
>>         self.cw = QtWidgets.QWidget(self)
>>         self.setCentralWidget(self.cw)
>>         self.l = QtWidgets.QVBoxLayout(self.cw)
>>         self.le = QtWidgets.QLineEdit(self.cw)
>>         self.l.addWidget(self.le)
>>         self.label = QtWidgets.QLabel()
>>         self.l.addWidget(self.label)
>>         self.show()
>>
>> app=QtWidgets.QApplication([sys.argv])
>> w=MainWindow()
>> app.setActiveWindow(w)
>> exit_code = app.exec_()
>>
>> sys.exit(exit_code)
>>
>> In the above code I can fix the problem by disabling the line edit
>> cursor
>> flash using app.setCursorFlashTime(0). However, this does NOT fix the
>> problem in my application. In my application, signals in other widgets
>> will
>> also cause the same mouse pointer shape changing (blinking) behavior.
>>
>> Version details:
>> *MacOS* Mojave 10.14.1
>> *PyQt5* 5.12.2
>> *Python* 3.7.3
>>
>> I have developed QtApplications in the past and never observed this
>> behavior and am at a loss as to why this is happening.
>>
>> It occurred to me this could be a MacOS bug, but I am unable to update
>> my
>> system at the moment (I am on a very poor internet connection and the
>> update is huge).
>>
>> Does anyone have a solution for this highly irritating behavior?
>>
>> EDIT: Change "mouse cursor" to "mouse pointer" for clarity.
>>
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

David Morris
Any idea on how I can track down what signal / event / system interrupt / whatever is causing this problem??

I tried creating a new user on my computer, fresh python install (3.6.2 for something different), fresh pyqt5 install ... and same problem.

David

On Wed, May 15, 2019 at 1:40 AM Phil Thompson <[hidden email]> wrote:
No, works fine for me.

Phil

On 14/05/2019 20:39, David Morris wrote:
> Updates (but no fix):
>
> I updated my mac to MacOS 10.14.5 and the problem persists.
> I tried some examples from PyQt5 and all exhibit the same behavior.
>
> However, Designer does NOT exhibit this behavior, and I understand it
> is
> written in Qt.  Is this a PyQt5 bug on MacOS?
>
> FYI, I installed PyQt5 using:  pip install pyqt5
>
> Can anyone on MacOS Mojave replicate this with my example code?
>
> David
>
> On Tue, May 14, 2019 at 4:22 PM David Morris <[hidden email]>
> wrote:
>
>> I am developing a small media player application using PyQt5 on MacOS
>> Mojave. Any time the mouse is hovering over a widget where the mouse
>> pointer changes shape, the mouse pointer begins to blink (flash?),
>> changing
>> shape between the normal mouse pointer and the alternate mouse
>> pointer.
>>
>> For example, if I create a QLineEdit widget the mouse pointer changes
>> to
>> an I-Beam as the alternate pointer when hovering over the widget.
>> Ordinarily this the mouse pointer simply changes shape so long as I am
>> hovering over the widget. However, in the below test application the
>> mouse
>> pointer continually changes shape between the I-Beam pointer and the
>> normal
>> arrow mouse pointer, changing back and forth at the same rate as the
>> input
>> position cursor in the widget.
>>
>> Example code showing this behavior on my system:
>>
>> import sysfrom PyQt5               import QtWidgetsfrom PyQt5         
>>      import QtCore
>>
>> class MainWindow(QtWidgets.QMainWindow):
>>     sig = QtCore.pyqtSignal()
>>     def __init__(self):
>>         super().__init__()
>>         self.resize(400,400)
>>         self.cw = QtWidgets.QWidget(self)
>>         self.setCentralWidget(self.cw)
>>         self.l = QtWidgets.QVBoxLayout(self.cw)
>>         self.le = QtWidgets.QLineEdit(self.cw)
>>         self.l.addWidget(self.le)
>>         self.label = QtWidgets.QLabel()
>>         self.l.addWidget(self.label)
>>         self.show()
>>
>> app=QtWidgets.QApplication([sys.argv])
>> w=MainWindow()
>> app.setActiveWindow(w)
>> exit_code = app.exec_()
>>
>> sys.exit(exit_code)
>>
>> In the above code I can fix the problem by disabling the line edit
>> cursor
>> flash using app.setCursorFlashTime(0). However, this does NOT fix the
>> problem in my application. In my application, signals in other widgets
>> will
>> also cause the same mouse pointer shape changing (blinking) behavior.
>>
>> Version details:
>> *MacOS* Mojave 10.14.1
>> *PyQt5* 5.12.2
>> *Python* 3.7.3
>>
>> I have developed QtApplications in the past and never observed this
>> behavior and am at a loss as to why this is happening.
>>
>> It occurred to me this could be a MacOS bug, but I am unable to update
>> my
>> system at the moment (I am on a very poor internet connection and the
>> update is huge).
>>
>> Does anyone have a solution for this highly irritating behavior?
>>
>> EDIT: Change "mouse cursor" to "mouse pointer" for clarity.
>>
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

Colin McPhail-3
Hi,

I can confirm that when I run your example program I too see the mouse pointer alternate between an arrow and an I-beam, so it's not just your setup. I'm running on macOS 10.14.4 with:
    Python: 3.7.3
    Sip: 4.19.17
    Qt: 5.12.3
    PyQt: 5.12.2

Regards,
Colin McPhail

On 15 May 2019, at 07:41, David Morris <[hidden email]> wrote:

Any idea on how I can track down what signal / event / system interrupt / whatever is causing this problem??

I tried creating a new user on my computer, fresh python install (3.6.2 for something different), fresh pyqt5 install ... and same problem.

David

On Wed, May 15, 2019 at 1:40 AM Phil Thompson <[hidden email]> wrote:
No, works fine for me.

Phil

On 14/05/2019 20:39, David Morris wrote:
> Updates (but no fix):
>
> I updated my mac to MacOS 10.14.5 and the problem persists.
> I tried some examples from PyQt5 and all exhibit the same behavior.
>
> However, Designer does NOT exhibit this behavior, and I understand it
> is
> written in Qt.  Is this a PyQt5 bug on MacOS?
>
> FYI, I installed PyQt5 using:  pip install pyqt5
>
> Can anyone on MacOS Mojave replicate this with my example code?
>
> David
>
> On Tue, May 14, 2019 at 4:22 PM David Morris <[hidden email]>
> wrote:
>
>> I am developing a small media player application using PyQt5 on MacOS
>> Mojave. Any time the mouse is hovering over a widget where the mouse
>> pointer changes shape, the mouse pointer begins to blink (flash?),
>> changing
>> shape between the normal mouse pointer and the alternate mouse
>> pointer.
>>
>> For example, if I create a QLineEdit widget the mouse pointer changes
>> to
>> an I-Beam as the alternate pointer when hovering over the widget.
>> Ordinarily this the mouse pointer simply changes shape so long as I am
>> hovering over the widget. However, in the below test application the
>> mouse
>> pointer continually changes shape between the I-Beam pointer and the
>> normal
>> arrow mouse pointer, changing back and forth at the same rate as the
>> input
>> position cursor in the widget.
>>
>> Example code showing this behavior on my system:
>>
>> import sysfrom PyQt5               import QtWidgetsfrom PyQt5         
>>      import QtCore
>>
>> class MainWindow(QtWidgets.QMainWindow):
>>     sig = QtCore.pyqtSignal()
>>     def __init__(self):
>>         super().__init__()
>>         self.resize(400,400)
>>         self.cw = QtWidgets.QWidget(self)
>>         self.setCentralWidget(self.cw)
>>         self.l = QtWidgets.QVBoxLayout(self.cw)
>>         self.le = QtWidgets.QLineEdit(self.cw)
>>         self.l.addWidget(self.le)
>>         self.label = QtWidgets.QLabel()
>>         self.l.addWidget(self.label)
>>         self.show()
>>
>> app=QtWidgets.QApplication([sys.argv])
>> w=MainWindow()
>> app.setActiveWindow(w)
>> exit_code = app.exec_()
>>
>> sys.exit(exit_code)
>>
>> In the above code I can fix the problem by disabling the line edit
>> cursor
>> flash using app.setCursorFlashTime(0). However, this does NOT fix the
>> problem in my application. In my application, signals in other widgets
>> will
>> also cause the same mouse pointer shape changing (blinking) behavior.
>>
>> Version details:
>> *MacOS* Mojave 10.14.1
>> *PyQt5* 5.12.2
>> *Python* 3.7.3
>>
>> I have developed QtApplications in the past and never observed this
>> behavior and am at a loss as to why this is happening.
>>
>> It occurred to me this could be a MacOS bug, but I am unable to update
>> my
>> system at the moment (I am on a very poor internet connection and the
>> update is huge).
>>
>> Does anyone have a solution for this highly irritating behavior?
>>
>> EDIT: Change "mouse cursor" to "mouse pointer" for clarity.
>>
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

Kyle Altendorf
In reply to this post by David Morris
On 2019-05-15 02:41, David Morris wrote:

> Any idea on how I can track down what signal / event / system interrupt
> / whatever is causing this problem??
>
> I tried creating a new user on my computer, fresh python install (3.6.2
> for something different), fresh pyqt5 install ... and same problem.

I think this report matches your description more or less.

https://bugreports.qt.io/browse/QTBUG-75552

Have you tried other versions of PyQt5? If the report properly
identifies Qt 5.12.3 as the affected version then PyQt5<=5.12.1 should
work.  But, if it doesn't, maybe try a few more versions back.

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Mouse pointer changing shape (blinking) on signals and QLineEdit text cursor blink

David Morris
Kyle this appears to be exactly my problem!  I tried 5.12.1 and the problem is solved (as I assume it will also in 5.12.4 once that is available).   Thank you, this was driving me crazy!

David

On Wed, May 15, 2019 at 5:52 PM Kyle Altendorf <[hidden email]> wrote:
On 2019-05-15 02:41, David Morris wrote:

> Any idea on how I can track down what signal / event / system interrupt
> / whatever is causing this problem??
>
> I tried creating a new user on my computer, fresh python install (3.6.2
> for something different), fresh pyqt5 install ... and same problem.

I think this report matches your description more or less.

https://bugreports.qt.io/browse/QTBUG-75552

Have you tried other versions of PyQt5? If the report properly
identifies Qt 5.12.3 as the affected version then PyQt5<=5.12.1 should
work.  But, if it doesn't, maybe try a few more versions back.

Cheers,
-kyle

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt