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

QtDesigner does not create correct relative file path for icons in ui files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.8.0, 5.9.1
    • Tools: Designer
    • None
    • macOS

    Description

      When using a file path icon from QtDesigner (ie, not a qrc resource nor a theme name), this produce wrong file path on macOS.

      For some reason, QtDesigner try to translate the file path relative to something (the app ?) instead of keeping the file path absolute and this relative file path is wrong.

      It seems it forget to prepend 3 cd up (coming from the macOS bundle).

       

      Original filepath: 

      /Users/pasnox/Pictures/Avatars/minitel.png - works

      QtDesigner filepath: 

      ../../../../../Users/pasnox/Pictures/Avatars/minitel.png - does not works

      Manually fixed filepath: 

      ../../../../../../../../Users/pasnox/Pictures/Avatars/minitel.png - works

       

      The uic generated code:

      QIcon icon;
      icon.addFile(QStringLiteral("../../../../../Users/pasnox/Pictures/Avatars/minitel.png"), QSize(), QIcon::Normal, QIcon::Off);
      setWindowIcon(icon);
      

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            filipe.azevedo Filipe Azevedo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes