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. Can I stop a QIcon antialiasing when rendering an SVG file?

Can I stop a QIcon antialiasing when rendering an SVG file?

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

    Hello,

    I am using svg files for icons and I load them directly into a QIcon and then pass them to a QToolButton as its Icon.

    Like this...
    @
    ...
    QIcon bicon(filename);
    ....
    button->setIcon(bicon);
    ...
    @

    The SVG image is rendered with antialiasing and I would like have it not use antialiasing. How can I prevent it rendering with antialiasing?

    Do I need to implement the paintEvent() function and turn it off there or is there some other way?

    Thanks

    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