Results 1 to 2 of 2

Thread: where is the problem in my project?! (about svg and png)

  1. #1
    Join Date
    Dec 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy where is the problem in my project?! (about svg and png)

    in this line when i set .svg i get an erro message but when i use .png it works!!

    actnAbout=new QAction(QIcon("./resources/icon.svg"),tr("&About MDic"),this); //have error
    and error is
    //ERROR: Cannot open file '/home/mtux/resources/icon.svg', because: No such file or directory

    but all of path is relative and i don't know why it wants to find this path /home/mtux/resources/icon.svg
    even my project working directory is /home/majid/Desktop/mdic/mdic

    and my /home/mtux is completely clean!! even no png .

    but this works!
    actnAbout =new QAction(QIcon("./resources/icon.png"),tr("&About MDic"),this); //wroks


    both svg and png files are beside each other .

    Important: i got this error message in kdevelop but when i try it by qmake and make and then ./myproject everything is ok but why i have such error?
    in another project i use svg files without any problem and everything works fine!

  2. #2

    Default Re: where is the problem in my project?! (about svg and png)

    Is the image file defined in your .qrc file?

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.