Results 1 to 3 of 3

Thread: Add pictures svg in QIcon

  1. #1
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Add pictures svg in QIcon

    Hi,
    I have file .qrc with pictures svg. I would want to visualize the figures in QIcon without to supply with l' exe. How I must make?

  2. #2
    Join Date
    May 2010
    Posts
    61
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Add pictures svg in QIcon

    Hi giorgik,

    I don't think you can use svg with QIcon.
    See the QtSvg module for more documentation.

    Regards,
    Wladek
    One second is long, everything longer than two seconds is definitely too long.

  3. #3
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add pictures svg in QIcon

    Yes, is possible:

    QIcon(":/ostacolo.svg")

    where the file risorsa.qrc:

    <RCC>
    <qresource>
    <file>robot.svg</file>
    <file>ostacolo.svg</file>
    </qresource>
    </RCC>

Similar Threads

  1. runing from .exe and pictures
    By Arisss in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2010, 17:10
  2. How to display 16 bit grayscale pictures?
    By reimer in forum Qt Programming
    Replies: 5
    Last Post: 20th August 2008, 19:55
  3. QTableView Splitter and pictures
    By JeanC in forum Qt Tools
    Replies: 9
    Last Post: 29th December 2007, 15:43
  4. Help with opening many pictures
    By philipp1 in forum Qt Programming
    Replies: 3
    Last Post: 14th October 2006, 00:13
  5. Replies: 2
    Last Post: 31st May 2006, 21:52

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.