Focus on QLabel twitches text
-
Whenever there's focus on a
QLabel
, the text inside twitches a little to the bottom. Take a look at this picture:
http://i90.photobucket.com/albums/k274/alaa_137/qlabel_zps3aheyglu.png
Here every digit is a separateQLabel
.
Notice that the first digit on the left is twitched a little to the bottom because it has focus. Also when I move focus to another digit, then the 1st digit is still twitched, and the newly focused digit gets twitched as well.Why is this happening? Can I disable this?
Thanks
-
Whenever there's focus on a
QLabel
, the text inside twitches a little to the bottom. Take a look at this picture:
http://i90.photobucket.com/albums/k274/alaa_137/qlabel_zps3aheyglu.png
Here every digit is a separateQLabel
.
Notice that the first digit on the left is twitched a little to the bottom because it has focus. Also when I move focus to another digit, then the 1st digit is still twitched, and the newly focused digit gets twitched as well.Why is this happening? Can I disable this?
Thanks
@AlaaM
Operating system?
Qt version?
Using stylesheets or anything?
Any interaction with the widget's QStyle? -
Operating system: Ubuntu 14.04
Qt 5.5.1
Was using the following stylesheet:QString("QLabel:focus{" "outline: 0;" "background-color: #" BACKGROUND "; " "color: #" FOREGROUND "; " "} " )
But seems that the issue happens with and without it.
Nothing with the widget's QStyle
-
Operating system: Ubuntu 14.04
Qt 5.5.1
Was using the following stylesheet:QString("QLabel:focus{" "outline: 0;" "background-color: #" BACKGROUND "; " "color: #" FOREGROUND "; " "} " )
But seems that the issue happens with and without it.
Nothing with the widget's QStyle
@AlaaM
Did you build Qt yourself?
have you changed anything regarding HARFBUZZ? -
@raven-worx I did not build Qt myself. I downloaded QtCreator and Qt libraries.
I don't know what HARFBUZZ is so I guess I didn't change it.I don't think this has something to do with the compilation...
I think it's either Ubuntu's default, or something in my code.
I can try to change theQLabel
to something else (sayQTextEdit
) and see what happens. -
@elveatles Yes. As I said: seems that the issue happens with and without it.
-
@raven-worx I did not build Qt myself. I downloaded QtCreator and Qt libraries.
I don't know what HARFBUZZ is so I guess I didn't change it.I don't think this has something to do with the compilation...
I think it's either Ubuntu's default, or something in my code.
I can try to change theQLabel
to something else (sayQTextEdit
) and see what happens.@AlaaM said:
I don't know what HARFBUZZ is so I guess I didn't change it.
HARFBUZZ is used for text rendering in Qt.
But i do not know if on Ubuntu (or in general in Linux) the system lib is used or the built-in version of Qt is used by default.Maybe someone else can confirm/disprove this?
But updating the harfbuzz lib on your system is worth a shot i guess.