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!
Bookmarks