From 9d0d1f8ea03dd87b6820488f61f14d036fbedc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cl=C3=A9ro?= Date: Wed, 26 Jun 2024 14:03:18 +0200 Subject: [PATCH] Update paths in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c8ce7df..d20a45d 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Vector icon set for modern desktop Qt5/Qt6 applications. Browse the 350+ icons o 1. With `QIcon::fromTheme()`, by using the icon name. ```c++ - const auto icon = QIcon::fromTheme("redo"); + const auto icon = QIcon::fromTheme("action/redo"); const auto pixmap = icon.pixmap(QSize(16, 16)); ``` @@ -98,13 +98,13 @@ Vector icon set for modern desktop Qt5/Qt6 applications. Browse the 350+ icons o 3. With `QPixmap`. Note that the resulting image will be `16`×`16` _physical_ pixels, so not adapted to High-Resolution screens. ```c++ - const auto pixmap = QPixmap(":/qlementine/icons/redo.svg"); + const auto pixmap = QPixmap(":/qlementine/icons/16/action/redo.svg"); ``` 4. With `QIcon`, to get any size, and ensure it will have the correct pixel ratio to be displayed on the scree. ```c++ - const auto icon = QIcon(":/qlementine/icons/redo.svg"); + const auto icon = QIcon(":/qlementine/icons/16/action/redo.svg"); const auto pixmap = icon.pixmap(QSize(64, 64)); ``` @@ -112,7 +112,7 @@ Vector icon set for modern desktop Qt5/Qt6 applications. Browse the 350+ icons o **This is the recommended way because it avoids making typo mistakes**. ```c++ - const auto icon = QIcon(iconPath(IconId::Action_Undo)); + const auto icon = QIcon(iconPath(Icons16::Action_Undo)); const auto pixmap = icon.pixmap(QSize(16, 16)); ```