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
Forum Updated to NodeBB v4.3 + New Features

Qt Assistant and mouseover

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 371 Views 2 Watching
  • 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on 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
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on 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
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on 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
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote on last edited by Perdrix
          #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
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 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

            GilboonetG 1 Reply Last reply
            1
            • Christian EhrlicherC Christian Ehrlicher

              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/

              GilboonetG Offline
              GilboonetG Offline
              Gilboonet
              wrote on 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
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 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
                • PerdrixP Offline
                  PerdrixP Offline
                  Perdrix
                  wrote on 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
                  • PerdrixP Offline
                    PerdrixP Offline
                    Perdrix
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Christian Ehrlicher referenced this topic on

                    • Login

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