win11, qt6 : default svg icon cannot show
all button svgs cannot show except tabs-menu-button.svg, using default configurtion.
OS: windows 11,
Qt Version: Qt 6.6.2 with all modules installed
My Solution It seems that the CMAKELists.txt miss some qt6 module/dlls configuration. And it seems that qt6 default doesn't support svg image formats.
-
Add Qt6::svg, Qt6::SvgWidgets to CMakeLists.txt
-
Copy "C:\Qt\6.6.2\msvc2019_64\plugins\imageformats\qsvg.dll" to ${PROJECT_ROOT}\cmake-build-release\plugins\imageformats
Then it works:
I can not confirm this bug. I just checked out the latest master branch and compiled it with Qt 6.6.2 and MSVC 2019 on Windows 11. I can see all SVG icons in the demo application.
I got the same issue, @likedev 's solution works for me. My Qt version: 6.7.2.
@BA7LYA Ok, then please create a pull request to fix this properly for all users.
Hi, I've been testing the PySide6 bindings for this and just came across the same problem. Unfortunately it doesn't seem that it can be as easily fixed from the user side by dropping the DLL file anywhere. A small addition, this is fixed by importing PySide6.QtSvg right before PySide6QtAds, I guess this best needs to happen in the init of QtAds.
@likedev Hi, I just tested this with Qt 6.6.2 doing the following steps:
- Opening the CMakeLists file of ADS in QtCreator
- Configure the project for Qt 6.6.2
- Compile ther whole project including demo application and example
- Run demo application
I can see all SVG icons in the demo and example aplication.
Could you please try to reprodcue the problem with the demo and example applicatinos with Qt 6.6.2. If you can reproduce the problem, then please tell me the steps.
Closing this issue because it does not seem to be very important. No pull requests with fixes yet.