Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Linked png in QtHelp file
Forum Updated to NodeBB v4.3 + New Features

Linked png in QtHelp file

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
22 Posts 3 Posters 6.4k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    You have to be more specific, which version of Qt 5 are you talking about ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    G 1 Reply Last reply
    0
    • SGaistS SGaist

      Hi and welcome to devnet,

      You have to be more specific, which version of Qt 5 are you talking about ?

      G Offline
      G Offline
      gegorbet
      wrote on last edited by
      #3

      @SGaist The symptom of mishandling png files actually occurs both in qt 5.6.0 and 5.6.2. Do you believe that QtHelp files correctly handle png file in anchors in any version of Qt5?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Your current version of QtHelp is likely using QtWebKit as backend which as been deprecated and was removed in Qt 5.6. More recent version is using the basic QTextBrowser class which has less features.

        You can test with Qt 5.5.X

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • ? Guest
          G Offline
          G Offline
          gegorbet
          wrote on last edited by
          #5

          We display our help files (via .qhc, .qch) by running Assistant with arguments like "--collectionFile ... manual.qhc". It is not an application that we build that actually does the display; rather it is Qt's Assistant.

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #6

            Update : sorry missed SGaist post. This info is redundant :)

            Yes but I think it was also changed.
            //your code here
            Let me find old 5.5 and check :)
            Maybe i remember wrong.

            Nope. was webkit before
            alt text

            So it might be related going from webkit to Text Browser?

            G 1 Reply Last reply
            0
            • mrjjM mrjj

              Update : sorry missed SGaist post. This info is redundant :)

              Yes but I think it was also changed.
              //your code here
              Let me find old 5.5 and check :)
              Maybe i remember wrong.

              Nope. was webkit before
              alt text

              So it might be related going from webkit to Text Browser?

              G Offline
              G Offline
              gegorbet
              wrote on last edited by
              #7

              Let me see if I understand where this is going. Are you saying that the move to QTextBrowser is what broke the ability to handle HTML in all the ways a browser would? That would include handling "<a href='...png'....". So, I'd have to revert from 5.6 back to 5.5; or wait for a fix to QTextBrowser?

              mrjjM 1 Reply Last reply
              0
              • G gegorbet

                Let me see if I understand where this is going. Are you saying that the move to QTextBrowser is what broke the ability to handle HTML in all the ways a browser would? That would include handling "<a href='...png'....". So, I'd have to revert from 5.6 back to 5.5; or wait for a fix to QTextBrowser?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @gegorbet
                Hi, im not saying its that. You should test it.

                Its just that TextBrowser is not a full browser as webkit was. (AT ALL)

                If using the TextBrowser is the reason for it then you should
                look into find other way to make it work for Text Browser. ( other html code)
                Or just use 5.5 if that is an option.
                Webkit is deprecated and unless TextBrowser is supposed to handle png the same way,
                its very unlikely there will ever be a fix.

                G 2 Replies Last reply
                0
                • mrjjM mrjj

                  @gegorbet
                  Hi, im not saying its that. You should test it.

                  Its just that TextBrowser is not a full browser as webkit was. (AT ALL)

                  If using the TextBrowser is the reason for it then you should
                  look into find other way to make it work for Text Browser. ( other html code)
                  Or just use 5.5 if that is an option.
                  Webkit is deprecated and unless TextBrowser is supposed to handle png the same way,
                  its very unlikely there will ever be a fix.

                  G Offline
                  G Offline
                  gegorbet
                  wrote on last edited by
                  #9

                  @mrjj Good to know. I am building 5.5.1 to see if webkit fixes my problem. If so and if - as you say - there is unlikely to be a fix forthcoming in QTextBrowser; then at least I'll know the situation. I would be inclined to wrap all my linked PNG files in thin HTML rather than be tied to a deprecated class.

                  G 1 Reply Last reply
                  0
                  • G gegorbet

                    @mrjj Good to know. I am building 5.5.1 to see if webkit fixes my problem. If so and if - as you say - there is unlikely to be a fix forthcoming in QTextBrowser; then at least I'll know the situation. I would be inclined to wrap all my linked PNG files in thin HTML rather than be tied to a deprecated class.

                    G Offline
                    G Offline
                    gegorbet
                    wrote on last edited by
                    #10

                    No joy. Built with 5.5.1 (WebKit), Assistant still displays PNG files as their content, not an image. Any other ideas of where to look?

                    G 1 Reply Last reply
                    0
                    • G gegorbet

                      No joy. Built with 5.5.1 (WebKit), Assistant still displays PNG files as their content, not an image. Any other ideas of where to look?

                      G Offline
                      G Offline
                      gegorbet
                      wrote on last edited by
                      #11

                      I'll have to back off my previous statement. The 5.5.1 I built has an Assistant binary which - according to the About - uses TextBrowser. So, I have not demonstrated that WebKit won't display png's correctly. What arguments do I add to the configure to insure Assistant builds with WebKit?

                      How do I attach an image to a post?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        What OS are you on ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        G 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          What OS are you on ?

                          G Offline
                          G Offline
                          gegorbet
                          wrote on last edited by
                          #13

                          @SGaist CentOS 6.7

                          G 1 Reply Last reply
                          0
                          • G gegorbet

                            @SGaist CentOS 6.7

                            G Offline
                            G Offline
                            gegorbet
                            wrote on last edited by
                            #14

                            After a long set of sessions building Qt 5.5.1 with arguments I thought might link in WebKit, I arrived at a 5.5.1 assistant which its About dialog says still uses TextBrowser. Lots of Googling with no results, so I ask here: do you know what arguments to ./configure insure Assistant uses WebKit?

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #15

                              What parameters are you passing to configure when you build Qt ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              G 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                What parameters are you passing to configure when you build Qt ?

                                G Offline
                                G Offline
                                gegorbet
                                wrote on last edited by
                                #16

                                @SGaist What parameters would you suggest in order to have Assistant use WebKit?

                                1 Reply Last reply
                                0
                                • mrjjM mrjj

                                  @gegorbet
                                  Hi, im not saying its that. You should test it.

                                  Its just that TextBrowser is not a full browser as webkit was. (AT ALL)

                                  If using the TextBrowser is the reason for it then you should
                                  look into find other way to make it work for Text Browser. ( other html code)
                                  Or just use 5.5 if that is an option.
                                  Webkit is deprecated and unless TextBrowser is supposed to handle png the same way,
                                  its very unlikely there will ever be a fix.

                                  G Offline
                                  G Offline
                                  gegorbet
                                  wrote on last edited by
                                  #17

                                  @mrjj My efforts to prove that the WebKit-to-TextBrowser change is what has removed the ability to directly anchor PNG files in Assistant-based help has just taken too long and not produced reliable results. Similarly, my efforts to get acknowledgement (here or in various Googled sites) that this is a known problem have been fruitless thus far.

                                  I wrote a script that produces a thin HTML wrapper to each PNG I wish to anchor. Writing that script, applying it tor 17 anchored image files and modifying the appropriate href= values in 28 individual HTML components took much less time than I'd spent so far trying to find a Qt fix or appropriate general modification in our code.

                                  Thank you, mrjj, for the knowledge about TextBrowser. I will likely be marking this topic as "Solved" shortly unless there are any further relevant insights brought forward.

                                  1 Reply Last reply
                                  1
                                  • mrjjM Offline
                                    mrjjM Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #18

                                    Thank you for trying to verify. I had no luck either finding info regarding loss of
                                    this feature or similar. I remembered it - as suddenly the help looked .. different.

                                    Could you for future reference paste a "used to work" html sample and
                                    how it should look to do the correct thing with text browser?

                                    G 1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #19

                                      @gegorbet You need to built Qt with widgets and webkit enabled in order for Assistant to also get built since it uses the webkitwidgets module.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • mrjjM mrjj

                                        Thank you for trying to verify. I had no luck either finding info regarding loss of
                                        this feature or similar. I remembered it - as suddenly the help looked .. different.

                                        Could you for future reference paste a "used to work" html sample and
                                        how it should look to do the correct thing with text browser?

                                        G Offline
                                        G Offline
                                        gegorbet
                                        wrote on last edited by
                                        #20

                                        @mrjj
                                        This used to work:
                                        <a href=“images/vhw_enh_groups.png”>vHW Enhanced Groups</a>
                                        Now I must use:
                                        <a href=“vhw_enh_groups.img.html”>vHW Enhanced Groups</a>
                                        where the *.img.html file is just a rudimentary header and footer of HTML around:
                                        <img src="images/vhw_enh_groups.png" alt="van Holde -Weischet groups dialog"/>

                                        G 1 Reply Last reply
                                        1
                                        • G gegorbet

                                          @mrjj
                                          This used to work:
                                          <a href=“images/vhw_enh_groups.png”>vHW Enhanced Groups</a>
                                          Now I must use:
                                          <a href=“vhw_enh_groups.img.html”>vHW Enhanced Groups</a>
                                          where the *.img.html file is just a rudimentary header and footer of HTML around:
                                          <img src="images/vhw_enh_groups.png" alt="van Holde -Weischet groups dialog"/>

                                          G Offline
                                          G Offline
                                          gegorbet
                                          wrote on last edited by
                                          #21

                                          I tried one more time to build a 5.5.1 Qt where Assistant (for custom help) uses WebKit. I added "-D BROWSER_QTWEBKIT" as a configure argument. But I encountered numerous compile and link problems and never got a new Assistant built.

                                          So, I've decided to spend no more time on this. The topic is "Solved" in the sense that it is assumed that TextBrowser will never properly handle anchored png files. In our applications help files, all anchored png have been replaced with img.html files that are thin HTML wrappers around an embedded image.

                                          Thanks again. mrjj, for your help.

                                          mrjjM 1 Reply Last reply
                                          0

                                          • Login

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