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. [Solved] Help needed putting two SVGs side by side
Forum Updated to NodeBB v4.3 + New Features

[Solved] Help needed putting two SVGs side by side

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • L Offline
    L Offline
    Laganum
    wrote on last edited by
    #1

    Hello, this is my first post here
    I'm having trouble putting these two SVG files together, as shown in the image.
    The black line inbetween them is not supposed to be there.
    !http://i.imgur.com/lVAFOKG.png!

    The SVG on the left is scaling up and down, while the arrowhead stays the same size, but should always stick to the end. When scaling, the space between them varies between what seems like 0 to 4 pixles, so I can't just say "x-1" for the position.
    This is what I use, as of now:
    @arrow->setPos(square->sceneBoundingRect().topRight());@

    Is there a way to remove what seems like a border around the sceneBoundingRect, or is there a better way of setting the position of the arrowhead?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Would be easy in QML, but this seems like QGraphicsView. Try disabling antialiasing, maybe halfpixels are to blame here?

      (Z(:^

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Laganum
        wrote on last edited by
        #3

        I've never tried QML, but I have tried disabling antialiasing and there was no difference.

        I'm not planning to convert all my code to QML because of this little thing. Thanks, but I guess I'll havea to keep looking for a simple solution.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sidewinder
          wrote on last edited by
          #4

          Are you sure the svg with a rectangle on the left doesn't have a border? Maybe there are some artefacts in file itself.

          "Never memorize what you can look up in books."
          Albert Einstein

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Laganum
            wrote on last edited by
            #5

            After inspecting the SVG files i found that there was a 0.3px opaque border on both SVG files. I didn't think professional designers would make such a basic mistake, but then again I am guilty of the same thing.

            Thank you very much for helping me with this.

            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