Results 1 to 2 of 2

Thread: Loading SVGs in QIcon

  1. #1
    Join Date
    Oct 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Loading SVGs in QIcon

    Hi,

    I'm trying to use svg images with qicon (qt4.3), like this:

    midiButton->setIcon(QIcon(":/images/preferences/controllers.svg"));

    This works fine on Linux but on Windows fails silently. The resources are definitely compiled in properly. I understand svg rendering is handled by a plugin, the Qt docs seem to imply loading this should happen automatically but is there something special I need to do?

    Thanks for any pointers,

    Adam

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Loading SVGs in QIcon

    Check your plugins/iconengines folder of the Qt installation if there is the svg plugin there.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.