QTooltip on readOnly widget
-
Hello,
I'm trying to add tooltips to a set of QLineEdit widgets that have been set to readOnly. These widgets are used for display purposes only, and only show a short cryptic mnemonic of an event. I'd like to add tooltips to these to show a more useful description of the abbreviated mnemonics, but it looks like the tooltips only show up if the QLineEdit widgets are not set as readOnly. (I'm using Qt 5.5).
I'm also hoping to be able to set these exclusively from Qt Designer.
Any help would be greatly appreciated. Thanks!
-
Hi
I just tried in Qt 5.13.1 on windows 10
with readonly QLineEdit and it still shows the tooltip
even when read only.Also setting enabled to false, it still shows
So might be a bug in Qt 5.5 or it was simply changed later on.
Is there a reason you use 5.5 ?
-
Hi
I just tried in Qt 5.13.1 on windows 10
with readonly QLineEdit and it still shows the tooltip
even when read only.Also setting enabled to false, it still shows
So might be a bug in Qt 5.5 or it was simply changed later on.
Is there a reason you use 5.5 ?
-
@mrjj Yeah, I've got a suite of legacy applications, some of which use the old QWebkit, so I've been hesitant to upgrade/port to a newer version. This is for a bunch of Windows desktop applications built with mingw. Thanks.
@bday1223
Ok so the "revived" version
https://forum.qt.io/topic/76739/webkit-status-2017
is not an option I guess.
That said the old webkit is a safety concern if the app is not purely internal.I dont have 5.5 to test with but i wonder if you can install an event filter and
check for the QEvent::ToolTip and show it manually
like seen in
https://doc.qt.io/qt-5/qtwidgets-widgets-tooltips-example.html -
@bday1223
Ok so the "revived" version
https://forum.qt.io/topic/76739/webkit-status-2017
is not an option I guess.
That said the old webkit is a safety concern if the app is not purely internal.I dont have 5.5 to test with but i wonder if you can install an event filter and
check for the QEvent::ToolTip and show it manually
like seen in
https://doc.qt.io/qt-5/qtwidgets-widgets-tooltips-example.html -
Hi
Yeah it does seem so.
I installed 5.5 and to my surprise the same sample did still show tooltip :)Please mark as solved then :)