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

REG: QTextBrowser resource lookup broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.1
    • 4.8.0
    • None
    • Win 7, Qt SDK (current version), Qt 4.8.0 (MinGW), MinGW 4.4 compiler from SDK

    Description

      When setting searchPaths in a QTextBrowser and providing a simple HTML snippet, some resources (images) are not found by the running application:

      The HTML snippet contains relative pathes to images. As long as the pathes are absolute, the resorces are displayed correctly. When pathes are relative, resources are only found and displayed, when the relative path is valid, relative to the application executable, not if it's relative to the directories provided in searchPaths.

      Unfortunately I couldn't find an obvious bug in the lookup, so I can only provide a testcase and no fix

      The Testcase is attatched as a ZIPed Qmake project. Two images are in the subfolders pics and pics/pic (which exist in debug output folder and the project folder!!!). The first displayed image is loaded from an absolute path, which works fine. The second image is loaded from ./pics/img1.png which also works, as it is a valid relative path from the app executable. The next two images are ./img1.png and ./pic/img2.png which are only resolvable, if .../debug/pics/ is part of the searchPaths (which is ensured in the main.cpp). These two lookups fail.

      In Qt 4.7.4 the example works fine and finds all the images!!!

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            jkriege2 Jan Krieger
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes