Results 1 to 3 of 3

Thread: qresource file alias problem with svg

  1. #1
    Join Date
    Dec 2007
    Posts
    20
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qresource file alias problem with svg

    Hi,

    I'd like to use aliases for my svg images.
    If I set an alias they are not working. If I change the file to non-svg then it is displayed.
    The files are exist. If I don't use the alias the files are shown.

    Why can't I use aliases for svg files????

    Not working
    Qt Code:
    1. <file alias="asdf">images/YELLOW/radiobutton_unchecked.svg</file>
    To copy to clipboard, switch view to plain text mode 
    Working
    Qt Code:
    1. <file>images/YELLOW/radiobutton_unchecked.svg</file>
    To copy to clipboard, switch view to plain text mode 
    Working
    Qt Code:
    1. <file alias="asdf">images/YELLOW/radiobutton_unchecked.png</file>
    To copy to clipboard, switch view to plain text mode 
    Working for svg
    Qt Code:
    1. QRadioButton#yellow::indicator::unchecked {image: url(:/images/YELLOW/radiobutton_unchecked.svg);}
    To copy to clipboard, switch view to plain text mode 
    Not working for svg, but working for png
    Qt Code:
    1. QRadioButton#yellow::indicator::unchecked {image: url(:/asdf);}
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qresource file alias problem with svg

    try to use the file extension with the alias like:
    <file alias="asdf.svg">images/YELLOW/radiobutton_unchecked.svg</file>

    Maybe the extension is necessary to load the right image plugin?

    Good luck,

    DeepDiver

  3. The following user says thank you to DeepDiver for this useful post:

    giotto (19th February 2008)

  4. #3
    Join Date
    Dec 2007
    Posts
    20
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: qresource file alias problem with svg

    It works!

    Thank you!

    png's why don't need the extension in the alias? :S

    Quote Originally Posted by DeepDiver View Post
    try to use the file extension with the alias like:
    <file alias="asdf.svg">images/YELLOW/radiobutton_unchecked.svg</file>

    Maybe the extension is necessary to load the right image plugin?

    Good luck,

    DeepDiver

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. EXE File problem
    By triperzz in forum Installation and Deployment
    Replies: 8
    Last Post: 18th January 2008, 19:00
  3. Debug problem in Eclipse with qrc file
    By Vortex in forum General Programming
    Replies: 6
    Last Post: 27th December 2007, 00:56
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

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.