Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. QIcon ThemeIcons not showing up in WebAssembly apps

QIcon ThemeIcons not showing up in WebAssembly apps

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
qiconthemeicon
3 Posts 2 Posters 901 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmacmillan2000
    wrote on last edited by
    #1

    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>

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pmacmillan2000
      wrote on last edited by
      #2

      Here it is working in a desktop app:

      Screenshot1.png

      And here it is not working in a Web Assembly app:

      Screenshot2.png

      1 Reply Last reply
      0
      • GilboonetG Offline
        GilboonetG Offline
        Gilboonet
        wrote on last edited by
        #3

        For WebAssembly you cannot use theme icons directly but must use the Qt Ressource System

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved