Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsPixmapItem VS QGraphicsItem with painted pixmap
Qt 6.12 LTS is out! See what's new in the release blog

QGraphicsPixmapItem VS QGraphicsItem with painted pixmap

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.2k 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.
  • GofferG Offline
    GofferG Offline
    Goffer
    wrote on last edited by
    #1

    Hey guys,

    I'm trying to dispay an icon on a QGraphicsItem, The thing is I have a zoom feature and I would like to keep the quality of my icon while zooming.

    I am using a .svg for vecotrial icons.
    I have tried to use the QGraphicsPixmapItem so I could use the smoothTransformation.

    • didn't see a real difference
    • too heavy

    And I went for the classical way, directly drawing the pixmap in my QGraphicsItem

    • Very good speed
    • Bad quality while zooming

    So none of the above seemed to work for me. Are there different ways of doing such things without cutting down the speed.

    Thx ;)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on last edited by
      #2

      Could you show some code?

      My first idea would be to try QGraphicsSvgItem.

      1 Reply Last reply
      1
      • GofferG Offline
        GofferG Offline
        Goffer
        wrote on last edited by
        #3

        QGraphicsSvgItem seems to work perfectly, the only problem I have with this is I am using an online wrapper so my code works with Qt4 and Qt5 but QtSvg doesn't seem to be properly implemented in there.

        So I had to manually import it from PySide2 to test.

        Other than that, great solution ! Didn't know about QtSvg.

        Thank you !

        1 Reply Last reply
        0
        • GofferG Offline
          GofferG Offline
          Goffer
          wrote on last edited by
          #4

          Actually the wrapper has been updated, So it's all good !

          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
          • Unsolved