Results 1 to 5 of 5

Thread: Question regarding scalable svg files as icons

  1. #1
    Join Date
    Jan 2008
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Question regarding scalable svg files as icons

    Hi,

    I am using PyQt4, but I don't think it is a python problem. For an application I am working on, I need one icon in a normal size, but also in a larger size (for an animation).

    I have this image in an SVG file which I thought to be scalable in client programs.

    For some reason, when I put the QIcon created with the SVG file on a toolbutton, it stays really small. Even when I modify the SVG file to be 425x425 pixels (really large) and load it as a QIcon, it looks really small on the toolbutton.

    Is there a way I can just resize the SVG file that is in a QIcon?

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

    Default Re: Question regarding scalable svg files as icons

    Did you change the iconSize property of the button?

  3. #3
    Join Date
    Jan 2008
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Question regarding scalable svg files as icons

    Quote Originally Posted by wysota View Post
    Did you change the iconSize property of the button?
    Sweet, that is solving my problem

    I have looked on the internet, but I did not find this answer anywhere... If only all of my problems were solvable this easy

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

    Default Re: Question regarding scalable svg files as icons

    You should have looked in the documentation :]

  5. #5
    Join Date
    Jan 2008
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Question regarding scalable svg files as icons

    Quote Originally Posted by wysota View Post
    You should have looked in the documentation :]
    I did that also, as good as I could. The problem is that if you don't know that you have to look for setIconSize, it is rather difficult to find

Similar Threads

  1. Replies: 1
    Last Post: 7th July 2006, 10:14

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.