Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Design Tooling
  3. Qt Design Studio
  4. Images not showing in preview mode
Forum Updated to NodeBB v4.3 + New Features

Images not showing in preview mode

Scheduled Pinned Locked Moved Unsolved Qt Design Studio
3 Posts 2 Posters 790 Views 1 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.
  • T Offline
    T Offline
    therealmatiss
    wrote on last edited by
    #1

    Hello!

    I have a weird issue - when I open a QML file, which contains qrc: images, the images don't show up in the preview until I select the same source file again. For example.

    1. This is the first thing I see, when I open up the .qml file:
      6b60cffb-0afc-4676-8aa3-c467890e400b-image.png

    As you can see, the Source IS found (obviously, because it works, when I run it). So in order for the button to show up in the Preview, I have to select the exactly same Source via GUI (even though it's correctly selected by default)

    1. I press the Source selection and select the exact same qrc: file:
      a091eeb6-113a-4839-ba58-4defa72ec86d-image.png

    2. Suddenly the preview shows up
      750f726f-5ef9-4900-a0b5-0979271158ff-image.png

    So the thing that changes in QML, when I do that is:
    Before: source: "qrc:/assets/buttons/btn-secondary-ok-0.png"
    After: source: "../../assets/buttons/btn-secondary-ok-0.png"

    Isn't the correct way to use QRC instead of relative pathing? Do I have to change my entire project to not use QRC just for previews to work?

    P. S. The .qml file and the asset file are in separate QRC files.

    Any help appreciated! :)

    T 1 Reply Last reply
    0
    • T therealmatiss

      Hello!

      I have a weird issue - when I open a QML file, which contains qrc: images, the images don't show up in the preview until I select the same source file again. For example.

      1. This is the first thing I see, when I open up the .qml file:
        6b60cffb-0afc-4676-8aa3-c467890e400b-image.png

      As you can see, the Source IS found (obviously, because it works, when I run it). So in order for the button to show up in the Preview, I have to select the exactly same Source via GUI (even though it's correctly selected by default)

      1. I press the Source selection and select the exact same qrc: file:
        a091eeb6-113a-4839-ba58-4defa72ec86d-image.png

      2. Suddenly the preview shows up
        750f726f-5ef9-4900-a0b5-0979271158ff-image.png

      So the thing that changes in QML, when I do that is:
      Before: source: "qrc:/assets/buttons/btn-secondary-ok-0.png"
      After: source: "../../assets/buttons/btn-secondary-ok-0.png"

      Isn't the correct way to use QRC instead of relative pathing? Do I have to change my entire project to not use QRC just for previews to work?

      P. S. The .qml file and the asset file are in separate QRC files.

      Any help appreciated! :)

      T Offline
      T Offline
      therealmatiss
      wrote on last edited by
      #2

      Help, anyone?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Thomas Hartmann
        wrote on last edited by
        #3

        Urls from qrc files are currently not supported. Please use relative URLs instead.

        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