Hopefully someone with more experience than I with "icon themes" can come and comment. Please, come one; come all 🙏
@dextermagnific Ok got it. Well in your case, I went and skimmed this file: https://github.com/qt/qtbase/blob/dev/src/gui/image/qiconloader.cpp
In skimming the code, it appeared to me that the only platform-specific implementation is QIconCacheGtkReader.
Thankfully (for my sanity), it appears that the docs confirm this:
https://doc.qt.io/qt-6/qicon.html#themeName (quote: "Platform icon themes are only implemented on Freedesktop based systems at the moment")
https://doc.qt.io/qt-6/qicon.html#fallbackThemeName (quote: "Platform fallback icon themes are only implemented on Freedesktop based systems at the moment")
So that makes me wonder if you only need your planned icon-theme approach to work on Linux? Have you tried QIcon::fromTheme on Windows or Mac and were you happy with the results?
(Keep in mind that I am still speaking as someone who has not used the "icon theme" feature of QWidgets even once. Please double-check my comments with added research because I don't want to lead anyone astray!)
If you only need it to work on Linux, then you can probably just look at QIconCacheGtkReader and learn how the icon selection is done for Freedesktop. (note to readers: I acknowledge my sloppy language conflating Linux and Freedesktop.)