From fe7a4b7bf85d1a47b8b22d7a0c60130f4e602802 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Mon, 2 Jun 2025 16:51:00 +0200 Subject: [PATCH] Doc: Explicitly advise adding svg, if any, before other files to QIcon Adding in the wrong order yields a QIcon that does not provide the expected or desired behavior. Fixes: QTBUG-135652 Pick-to: 6.9 6.8 Change-Id: Ie1f6e50ee82ddaae8857b076c383ede20ab872df Reviewed-by: Christian Ehrlicher (cherry picked from commit 472306523a9706ccf363c349edecccaadacfe5b1) Reviewed-by: Qt Cherry-pick Bot --- src/gui/image/qicon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 1ba7ddb9d34..1c4b2f205b7 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -609,6 +609,9 @@ QFactoryLoader *qt_iconEngineFactoryLoader() QImageWriter::supportedImageFormats() functions to retrieve a complete list of the supported file formats. + \note If using an SVG image file, make sure to add it before any non-SVG files, + so that the correct \l{Icon Engines}{icon engine} gets selected. + \section1 Creating an icon from a theme or icon library The most convenient way to construct an icon is by using the