Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85246

linkHovered signal emitted only once

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.0
    • None
    • Tested on mac using Qt 5.14
    • All

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            simonplatten Simon Platten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes