Results 1 to 3 of 3

Thread: SVG icons on a QPushButton?

  1. #1
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Cool SVG icons on a QPushButton?

    Hi Qt fans,

    currently I'm porting my apps to Qt4 using PyQt4(beta). Now I want to make them as much flexible for the future as possible. So I'm thinking about the use of SVG file format for all icons and conversion during runtime.

    First of all, is it possible to do so? How do I have to create a QPushButton with a SVG icon (or a converted format)?
    Second, does it make sense? If the application is slowing down because of runtime rendering, maybe I should continue using PNG icons...

    Thanks for your help,
    Juergen

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: SVG icons on a QPushButton?

    I would stick to PNG icons or implement some kind of an icon factory that would render and cache icons.

  3. #3
    Join Date
    May 2006
    Location
    Magdeburg, Germany
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: SVG icons on a QPushButton?

    Here you can find an icon engine plugin for Qt which allows using SVG files as native icons. It works, but you should use Qt 4.1.3 to see the icons without bad crashes and render problems caused by the qsvgrenderer. Currently there is no cache built in. Feel free to implement one ;-)

    http://www.qtforum.de/forum/viewtopic.php?t=2093

    Regards,

    E*

Similar Threads

  1. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40
  2. no icons on the another machine (after installation)
    By roxton in forum Installation and Deployment
    Replies: 2
    Last Post: 4th July 2008, 17:24
  3. Best way to manage application icons
    By SiLiZiUMM in forum Qt Programming
    Replies: 0
    Last Post: 23rd April 2008, 14:28
  4. QIcon Icons are not visible
    By harakiri in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2007, 19:11
  5. Facing problem with tool bar icons
    By jnana in forum Qt Programming
    Replies: 4
    Last Post: 20th April 2006, 08:37

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.