Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.14.0
-
None
-
Tested on mac using Qt 5.14
Description
When using a QLabel with a link, the signal for linkHovered is emitted once when the mouse moves over the label. A simple slot with only a debug message shows the signal is emitted and handled. If the mouse is moved off the label and then back onto it, no further hover signal is emitted.
Normally when a mouse moves over any element that supports a hover notification facility the signal would be emitted when the mouse is moved onto the element. It would be useful to have another signal emitted when the mouse moves off the element. No such signal exists and no further hover signal is emitted when the user hovers on the same element again.
I have a script that contains the slot:
function lblLinkHovered() {
console.info("-----lblLinkHovered()-----");
}
In my application I connect to this slot with:
cnSignal = QObject::connect(this, &clsQtLabel::linkHovered ,[pobjScriptEng, strCall, strFile, strScript]() { QString strScriptWithCall = static_cast<QString>(strScript) + static_cast<QString>(strCall) + "();"; pobjScriptEng->evaluate(strScriptWithCall); } );
The variable strScriptWithCall contains the full Script with a call to the slot at the end of the script.