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. SVG graphics appear as solid rectangles in QtCreator and App
Forum Updated to NodeBB v4.3 + New Features

SVG graphics appear as solid rectangles in QtCreator and App

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 456 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.
  • qwasder85Q Offline
    qwasder85Q Offline
    qwasder85
    wrote on last edited by
    #1

    We have a bunch of icons that were drawn, as vector graphics, in Photoshop.
    Since Photoshop's SVG export doesn't work properly, we then open the PSD file in Illustrator instead and export it as SVG from there (all export parameters left on default).

    Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

    e.g. This SVG:
    alt text

    shows up in Creator and the app like this:
    alt text

    Does anyone have experience with using SVGs in Qt? Why does this happen?

    JKSHJ 1 Reply Last reply
    0
    • qwasder85Q qwasder85

      @JKSH said in SVG graphics appear as solid rectangles in QtCreator and App:

      @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

      Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

      Can you upload the actual SVG file?

      Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

      Sure, here it is:
      https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by JKSH
      #4

      @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

      Can you upload the actual SVG file?

      Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

      Sure, here it is:
      https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

      SVG Tiny 1.2 does not support <clipPath>, I'm afraid.

      Your SVG file is implemented as a solid coloured block with sections clipped/masked away. Since Qt SVG can't do the clipping, it just shows the solid block.

      You'll need to find a way to re-implement the SVG file without clipping/masking.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      qwasder85Q 1 Reply Last reply
      2
      • qwasder85Q qwasder85

        We have a bunch of icons that were drawn, as vector graphics, in Photoshop.
        Since Photoshop's SVG export doesn't work properly, we then open the PSD file in Illustrator instead and export it as SVG from there (all export parameters left on default).

        Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

        e.g. This SVG:
        alt text

        shows up in Creator and the app like this:
        alt text

        Does anyone have experience with using SVGs in Qt? Why does this happen?

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #2

        @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

        Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

        Can you upload the actual SVG file?

        Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        qwasder85Q 1 Reply Last reply
        0
        • JKSHJ JKSH

          @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

          Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

          Can you upload the actual SVG file?

          Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

          qwasder85Q Offline
          qwasder85Q Offline
          qwasder85
          wrote on last edited by
          #3

          @JKSH said in SVG graphics appear as solid rectangles in QtCreator and App:

          @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

          Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

          Can you upload the actual SVG file?

          Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

          Sure, here it is:
          https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

          JKSHJ 1 Reply Last reply
          0
          • qwasder85Q qwasder85

            @JKSH said in SVG graphics appear as solid rectangles in QtCreator and App:

            @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

            Unfortunately, the icons appear as solid-colored rectangles in QtCreator's resource viewer and also in the running app. The symbols look perfectly fine in browsers and other image software like Inkscape.

            Can you upload the actual SVG file?

            Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

            Sure, here it is:
            https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by JKSH
            #4

            @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

            Can you upload the actual SVG file?

            Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

            Sure, here it is:
            https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

            SVG Tiny 1.2 does not support <clipPath>, I'm afraid.

            Your SVG file is implemented as a solid coloured block with sections clipped/masked away. Since Qt SVG can't do the clipping, it just shows the solid block.

            You'll need to find a way to re-implement the SVG file without clipping/masking.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            qwasder85Q 1 Reply Last reply
            2
            • JKSHJ JKSH

              @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

              Can you upload the actual SVG file?

              Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

              Sure, here it is:
              https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

              SVG Tiny 1.2 does not support <clipPath>, I'm afraid.

              Your SVG file is implemented as a solid coloured block with sections clipped/masked away. Since Qt SVG can't do the clipping, it just shows the solid block.

              You'll need to find a way to re-implement the SVG file without clipping/masking.

              qwasder85Q Offline
              qwasder85Q Offline
              qwasder85
              wrote on last edited by qwasder85
              #5

              @JKSH said in SVG graphics appear as solid rectangles in QtCreator and App:

              @qwasder85 said in SVG graphics appear as solid rectangles in QtCreator and App:

              Can you upload the actual SVG file?

              Please note that Qt only supports the static parts of SVG Tiny 1.2; it doesn't support the full SVG standard.

              Sure, here it is:
              https://drive.google.com/file/d/1S0urW9EeLDd6uNJCNaBRum9K0G4vprYh/view?usp=sharing

              SVG Tiny 1.2 does not support <clipPath>, I'm afraid.

              Your SVG file is implemented as a solid coloured block with sections clipped/masked away. Since Qt SVG can't do the clipping, it just shows the solid block.

              You'll need to find a way to re-implement the SVG file without clipping/masking.

              Thank you very much! Using Illustrator to save them as Tiny 1.2 SVGs solved the issue, apparently!

              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