I managed to get it working. I just need to know how I can get Emscripten to generate the notepad_ui.h header file from the uic file. For now I built it from within Qt Creator itself using the MSVC 2017 compiler, but I do want to know how to do it with Emscripten from the command line.
I also created the menus in such a way that clicking them gives you a dropdown with one item with the same text as the button where you have to click the dropdown to perform the action. Is there a way to do it without needing to create the dropdown?
Also, how do I change the configuration from Debug to Release?
Edit: I changed it to Release mode just fine so never mind that.
Anyway, although I can build it just fine in Qt Creator, trying it with Emscripten on the command line keeps failing. I get exceptions from the Emscripten script. If Qt developers can help with this, maybe I should open a new issue asking for help on building Qt apps to Wasm.
And for some reason, when running the app, I have to choose a font twice from the font selection dialog box when I click on the menu button for selecting a font. I also don't understand why it won't just create an action in Action Editor the moment I create a menu item. Why do I have to click on the "Type here" that comes up when I click on that and create another menu item there for the same action for it to work?