Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Assistant and mouseover

Qt Assistant and mouseover

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 314 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Perdrix
    wrote on 9 Mar 2025, 01:25 last edited by
    #1

    Does Qt Assistant support html like:

        You can see an example of a star mask on the right.<br>
        Mouse over the text to see <b><A onmouseover="document['STARMASK01'].src='../images/StarMask_Stars.jpg';document.getElementById('STARMASK01TEXT').innerHTML='Star Field';" href="javascript:void(0);">
        the image</A></b> or <b><A onmouseover="document['STARMASK01'].src='../images/StarMask_Mask.jpg';document.getElementById('STARMASK01TEXT').innerHTML='Star Mask';" href="javascript:void(0);">the star mask</A></b> 
    

    to select different images for display based on mouse location?

    Thanks
    David

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jeremy_k
      wrote on 9 Mar 2025, 02:18 last edited by
      #2

      It looks like Assistant's display is implemented via QTextBrowser, which makes no mention of javascript or QJSEngine in the documentation. As such, embedded javascript won't work.

      An application could use QTextBrowser::highlighted() to detect the mouseover and alter the underlying document as desired.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Perdrix
        wrote on 9 Mar 2025, 09:24 last edited by
        #3

        Well that's a great shame, as the help for my application is Windows .chm format, and it makes quite a bit of use of mouseover.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Perdrix
          wrote on 9 Mar 2025, 12:26 last edited by Perdrix 3 Sept 2025, 12:43
          #4

          Is anyone able to provide a definitive answer? I think QtWebKit does support javascript, and the file that I was pointed to seems to suggest the Assistant might use that ...

          Thanks, David

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 9 Mar 2025, 13:02 last edited by
            #5

            I know it's hard for a programmer but simply look at the code...

            https://code.qt.io/cgit/qt/qttools.git/tree/src/assistant/CMakeLists.txt
            It does not link against QtWebKit (which would be very surprising as this is dead since ages) but qlighthtml which is a wrapper around http://www.litehtml.com/

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            G 1 Reply Last reply 9 Mar 2025, 14:07
            1
            • C Christian Ehrlicher
              9 Mar 2025, 13:02

              I know it's hard for a programmer but simply look at the code...

              https://code.qt.io/cgit/qt/qttools.git/tree/src/assistant/CMakeLists.txt
              It does not link against QtWebKit (which would be very surprising as this is dead since ages) but qlighthtml which is a wrapper around http://www.litehtml.com/

              G Offline
              G Offline
              Gilboonet
              wrote on 9 Mar 2025, 14:07 last edited by
              #6

              @Christian-Ehrlicher said in Qt Assistant and mouseover:

              I know it's hard for a programmer but simply look at the code...

              https://code.qt.io/cgit/qt/qttools.git/tree/src/assistant/CMakeLists.txt
              It does not link against QtWebKit (which would be very surprising as this is dead since ages) but qlighthtml which is a wrapper around http://www.litehtml.com/

              If it was possible, I would downvote such a post that doesn't give any definitive nor at least helpful answer but a very subjective sarcastic view.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 9 Mar 2025, 14:18 last edited by
                #7

                Now tell me what's wrong with my answer?

                No, Qt Assistant does not use QtWebkit which was deprecated already 6 years ago, it uses litehtml. The features of litehtml are shown on http://www.litehtml.com/ - if you find something about javascript events there, let me know.
                And if you don't trust the sources, simply try it out. You would have known it already then...

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Perdrix
                  wrote on 9 Mar 2025, 17:05 last edited by
                  #8

                  In answer to the question - there's only so many hours in the day - often it is just quicker to ask than to to go digging in the source code (or to set up a test case).

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    Perdrix
                    wrote on 10 Mar 2025, 17:07 last edited by
                    #9

                    Now if QTextBrowser were based on QtWebEngine (well I can dream can't I).

                    1 Reply Last reply
                    0
                    • C Christian Ehrlicher referenced this topic 26 days ago

                    1/9

                    9 Mar 2025, 01:25

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved