QIcon ThemeIcons not showing up in WebAssembly apps
-
wrote on 3 Mar 2025, 23:00 last edited by
I have a very simple "hello, world" Qt Widgets app, with a QPushButton on the QMainWindow-derived main window.
I used the Property Editor in Qt Creator to specify an icon property for the button, chosen from among the built-in Theme icons. Everything works fine in a Desktop version of the app but in the Web Assembly version, the icon does not show up.
Is this expected?
Thanks
here is the ui xml:
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>30</x>
<y>20</y>
<width>171</width>
<height>51</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
<property name="icon">
<iconset theme="QIcon::ThemeIcon::DocumentPrint"/>
</property>
</widget> -
wrote on 3 Mar 2025, 23:16 last edited by
-
wrote on 4 Mar 2025, 09:50 last edited by
For WebAssembly you cannot use theme icons directly but must use the Qt Ressource System
2/3