svg no such file or directory
-
When trying to use a qt commonstyle svg file for a QIcon, or in a stylesheet i get this:
qt.svg: Cannot open file ':/qt-project.org/styles/commonstyle/images/question.svg', because: No such file or directoryBut referencing a commonstyle png file works. And if i put the svg file in my own resource file it works as expected.
Am i doing something wrong? -
And you're sure that the svg file exists in this resource? I would guess no.
-
You are right. I checked with QDir entrylist and all it can find are the png files.
Thing is, in the source files they are all together in that path.
So where are they! :)@Tink said in svg no such file or directory:
So where are they! :)
When you don't add them in your qrc file they won't be added.
-
Well that is very strange since all the png files are added by default. No need to put them in my own resource file.
But not the svg files... Those svg's are used however by standard widgets like QCombobox. So one would think that they can be referenced as well. -
Well that is very strange since all the png files are added by default. No need to put them in my own resource file.
But not the svg files... Those svg's are used however by standard widgets like QCombobox. So one would think that they can be referenced as well.@Tink said in svg no such file or directory:
No need to put them in my own resource file.
You have to do it somewhere - nothing is added automatically. But since you're using
':/qt-project.org
it's maybe a resource file inside the Qt libraries what you're using. And there only the png files were added to the qrc file: https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/CMakeLists.txt#n71 -
@Tink said in svg no such file or directory:
Have any idea if the svg's can also be utilized?
add them by yourself in your qrc file.
-
@Tink said in svg no such file or directory:
Have any idea if the svg's can also be utilized?
add them by yourself in your qrc file.
@Christian-Ehrlicher said in svg no such file or directory:
@Tink said in svg no such file or directory:
Have any idea if the svg's can also be utilized?
add them by yourself in your qrc file.
Yes but besides doing that.
-
@Christian-Ehrlicher said in svg no such file or directory:
@Tink said in svg no such file or directory:
Have any idea if the svg's can also be utilized?
add them by yourself in your qrc file.
Yes but besides doing that.
@Tink said in svg no such file or directory:
Yes but besides doing that.
??
Wait until someone adds them in the Qt sources then wait until this Qt version is released and use this Qt version.
-
@Tink said in svg no such file or directory:
Yes but besides doing that.
??
Wait until someone adds them in the Qt sources then wait until this Qt version is released and use this Qt version.
@Christian-Ehrlicher said in svg no such file or directory:
@Tink said in svg no such file or directory:
Yes but besides doing that.
??
Wait until someone adds them in the Qt sources then wait until this Qt version is released and use this Qt version.
Euhm... they are in the Qt sources?
https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/styles/images -
@Christian-Ehrlicher said in svg no such file or directory:
@Tink said in svg no such file or directory:
Yes but besides doing that.
??
Wait until someone adds them in the Qt sources then wait until this Qt version is released and use this Qt version.
Euhm... they are in the Qt sources?
https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/styles/images@Tink said in svg no such file or directory:
Euhm... they are in the Qt sources?
And? Noone added them to the CMakeLists.txt as I showed you above... so you have to wait until someone is doing this.
Don't know where this discussion should go to though...