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. Rendering svg image onto QImage

Rendering svg image onto QImage

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.1k 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.
  • D Offline
    D Offline
    dolevo
    wrote on last edited by
    #1

    Hi,

    I have a QImage and I draw an svg image onto. Here is my simplified code:

    @void WP::DrawImage(QImage &mImage)
    {
    QPainter *pPainter = new QPainter(&mImage);
    QSvgRenderer *svgImg = new QSvgRenderer(linkToSvgImage);

    QRect rct(0, 0, 500, 500);
    svgImg->render(pPainter, rct);        
    pPainter->end();
    
    delete svgImg;
    delete pPainter;
    

    }
    @

    However, the painted image is aliased and I want to have an anti-aliased image. I have tried setRenderHints() but didn't help. Could anyone help me about how to implement it?

    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